Skip to content

Commit

Permalink
add an explict int cast when checking enable_revmap
Browse files Browse the repository at this point in the history
  • Loading branch information
cotto committed Aug 26, 2010
1 parent a66c783 commit 0f6da6f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions github/github.py
Expand Up @@ -44,12 +44,12 @@ def __init__(self):

# IEnvironmentSetupParticpant methods
def environment_created(self):
if self.enable_revmap:
if int(self.enable_revmap):
self._upgrade_db(self.env.get_db_cnx())

#return true if the db table doesn't exist or needs to be updated
def environment_needs_upgrade(self, db):
if self.enable_revmap == 0:
if int(self.enable_revmap) == 0:
return False
cursor = db.cursor()
try:
Expand All @@ -63,7 +63,7 @@ def environment_needs_upgrade(self, db):
return True

def upgrade_environment(self, db):
if self.enable_revmap:
if int(self.enable_revmap):
self._upgrade_db(db)

def _upgrade_db(self, db):
Expand Down Expand Up @@ -220,7 +220,7 @@ def processChangesetURL(self, req):
url = req.path_info.replace('/changeset/', '')
self.env.log.debug("url is %s" % url)
svn_rev_match = re.match( '^([0-9]{1,6})([^0-9a-fA-F]|$)', url)
if svn_rev_match and self.enable_revmap:
if svn_rev_match and int(self.enable_revmap):
svn_rev = svn_rev_match.group(1)
commit_data = self._get_commit_data('r'+svn_rev)
if commit_data:
Expand Down

0 comments on commit 0f6da6f

Please sign in to comment.