Skip to content

Commit

Permalink
Issue #1030. Address review nits.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Taylor committed May 2, 2016
1 parent 554b6cf commit ea6d265
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions webcompat/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ def get_browser(user_agent_string=None):
# bizarre UA strings can be parsed like so:
# {'major': None, 'minor': None, 'family': 'Other', 'patch': None}
# but we want to return "Unknown", rather than "Other"
print(rv)
if rv.strip().lower() == "other":
return "Unknown"
return rv
Expand Down Expand Up @@ -154,7 +153,7 @@ def get_os(user_agent_string=None):
ua_dict = user_agent_parser.Parse(user_agent_string)
os = ua_dict.get('os')
version = os.get('major', u'Unknown')
if version != u'Unknown' and os.get('major'):
if version != u'Unknown' and os.get('minor'):
version = version + "." + os.get('minor')
if os.get('patch'):
version = version + "." + os.get('patch')
Expand Down

0 comments on commit ea6d265

Please sign in to comment.