File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Original file line number Diff line number Diff line change @@ -159,10 +159,8 @@ def __unicode__(self):
159
159
def _is_android_tablet (self ):
160
160
# Newer Android tablets don't have "Mobile" in their user agent string,
161
161
# older ones like Galaxy Tab still have "Mobile" though they're not
162
- if ('Mobile Safari' not in self .ua_string and
163
- self .browser .family != "Firefox Mobile" ):
164
- return True
165
- return False
162
+ return ('Mobile Safari' not in self .ua_string and
163
+ self .browser .family != "Firefox Mobile" )
166
164
167
165
def _is_blackberry_touch_capable_device (self ):
168
166
# A helper to determine whether a BB phone has touch capabilities
@@ -269,13 +267,11 @@ def is_pc(self):
269
267
270
268
@property
271
269
def is_bot (self ):
272
- return True if self .device .family == 'Spider' else False
270
+ return self .device .family == 'Spider'
273
271
274
272
@property
275
273
def is_email_client (self ):
276
- if self .browser .family in EMAIL_PROGRAM_FAMILIES :
277
- return True
278
- return False
274
+ return self .browser .family in EMAIL_PROGRAM_FAMILIES
279
275
280
276
281
277
def parse (user_agent_string ):
You can’t perform that action at this time.
0 commit comments