Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #86 from OpenInstall/py-test-bugfix

bugfix an error during python test (cannot compare None to int)
  • Loading branch information...
commit 312c8df2093a5f55856727839a3c296741383894 2 parents 2de1888 + 398c217
@elsigh elsigh authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  .gitignore
  2. +2 −2 py/ua_parser/user_agent_parser.py
View
2  .gitignore
@@ -3,4 +3,4 @@ node_modules
TAGS
dist
cabal-dev
-
+*.pyc
View
4 py/ua_parser/user_agent_parser.py
@@ -61,10 +61,10 @@ def Parse(self, user_agent_string):
if self.v1_replacement:
v1 = self.v1_replacement
- elif match.lastindex >= 2:
+ elif match.lastindex and match.lastindex >= 2:
v1 = match.group(2)
- if match.lastindex >= 3:
+ if match.lastindex and match.lastindex >= 3:
v2 = match.group(3)
if match.lastindex >= 4:
v3 = match.group(4)
Please sign in to comment.
Something went wrong with that request. Please try again.