Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dc87652

Browse filesBrowse 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
Copy full SHA for dc87652

File tree

Expand file treeCollapse file tree

3 files changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+5
-5
lines changed

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
+1-1Lines 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

Copy file name to clipboard
+2-2Lines 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

Copy file name to clipboardExpand all lines: user_agents/parsers.py
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.