Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

bugfix an error during python test (cannot compare None to int) #86

Merged
merged 1 commit into from

2 participants

@carver

Plus, ignore compiled python files

@elsigh elsigh was assigned
@elsigh elsigh merged commit 312c8df into tobie:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 11, 2012
  1. bugfix an error during python test (cannot compare None to int) & ign…

    Jason Carver authored
    …ore compiled python files
This page is out of date. Refresh to see the latest.
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)
Something went wrong with that request. Please try again.