Skip to content

Commit dc87652

Browse files
committed
Merge pull request selwin#19 from txtr/master
Relax "Windows RT" checks for devices that are "Windows RT 8.1"
2 parents 883ce6f + 102ace4 commit dc87652

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎setup.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
setup(
55
name='user-agents',
6-
version='0.3.1',
6+
version='0.3.2',
77
author='Selwin Ong',
88
author_email='selwin.ong@gmail.com',
99
packages=['user_agents'],

‎user_agents/__init__.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
VERSION = (0, 3, 1)
1+
VERSION = (0, 3, 2)
22

3-
from .parsers import parse
3+
from .parsers import parse

‎user_agents/parsers.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def is_tablet(self):
146146
return True
147147
if (self.os.family == 'Android' and self._is_android_tablet()):
148148
return True
149-
if self.os.family == 'Windows RT':
149+
if self.os.family.startswith('Windows RT'):
150150
return True
151151
return False
152152

@@ -178,7 +178,7 @@ def is_touch_capable(self):
178178
return True
179179
if self.device.family in TOUCH_CAPABLE_DEVICE_FAMILIES:
180180
return True
181-
if self.os.family == 'Windows 8' and 'Touch' in self.ua_string:
181+
if self.os.family.startswith('Windows 8') and 'Touch' in self.ua_string:
182182
return True
183183
if 'BlackBerry' in self.os.family and self._is_blackberry_touch_capable_device():
184184
return True

0 commit comments

Comments
 (0)