|
16 | 16 | PC_OS_FAMILIES = (
|
17 | 17 | 'Windows 95',
|
18 | 18 | 'Windows 98',
|
19 | | - 'Windows ME', |
20 | 19 | 'Solaris',
|
21 | 20 | )
|
22 | 21 |
|
|
51 | 50 | 'iOS',
|
52 | 51 | 'Android',
|
53 | 52 | 'Windows Phone',
|
54 | | - 'Windows Phone OS', |
55 | | - 'Windows RT', |
56 | 53 | 'Windows CE',
|
57 | 54 | 'Windows Mobile',
|
58 | 55 | 'Firefox OS',
|
@@ -172,7 +169,7 @@ def is_tablet(self):
|
172 | 169 | return True
|
173 | 170 | if (self.os.family == 'Android' and self._is_android_tablet()):
|
174 | 171 | return True
|
175 | | - if self.os.family.startswith('Windows RT'): |
| 172 | + if self.os.family=='Windows'andself.os.version_string.startswith('RT'): |
176 | 173 | return True
|
177 | 174 | if self.os.family == 'Firefox OS' and 'Mobile' not in self.browser.family:
|
178 | 175 | return True
|
@@ -217,16 +214,20 @@ def is_touch_capable(self):
|
217 | 214 | return True
|
218 | 215 | if self.device.family in TOUCH_CAPABLE_DEVICE_FAMILIES:
|
219 | 216 | return True
|
220 | | - if self.os.family.startswith('Windows 8') and 'Touch' in self.ua_string: |
221 | | - return True |
| 217 | + if self.os.family == 'Windows': |
| 218 | + if self.os.version_string.startswith('RT'): |
| 219 | + return True |
| 220 | + if self.os.version_string.startswith('8') and 'Touch' in self.ua_string: |
| 221 | + return True |
222 | 222 | if 'BlackBerry' in self.os.family and self._is_blackberry_touch_capable_device():
|
223 | 223 | return True
|
224 | 224 | return False
|
225 | 225 |
|
226 | 226 | @property
|
227 | 227 | def is_pc(self):
|
228 | 228 | # Returns True for "PC" devices (Windows, Mac and Linux)
|
229 | | - if 'Windows NT' in self.ua_string or self.os.family in PC_OS_FAMILIES: |
| 229 | + if 'Windows NT' in self.ua_string or self.os.family in PC_OS_FAMILIES or \ |
| 230 | + self.os.family == 'Windows' and self.os.version_string == 'ME': |
230 | 231 | return True
|
231 | 232 | # TODO: remove after https://github.com/tobie/ua-parser/issues/127 is closed
|
232 | 233 | if self.os.family == 'Mac OS X' and 'Silk' not in self.ua_string:
|
|
0 commit comments