Skip to content

Commit cc2b427

Browse files
author
Aurélien Scoubeau
committed
Relax "Windows RT" checks for devices that are "Windows RT 8.1"
1 parent 883ce6f commit cc2b427

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎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)