Skip to content

Commit

Permalink
Added missing exception include and fixed improper logger commands
Browse files Browse the repository at this point in the history
  • Loading branch information
brunnels committed Dec 17, 2012
1 parent cf387fe commit 9365a3e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions headphones/versioncheck.py
Expand Up @@ -17,6 +17,7 @@

import headphones
from headphones import logger, version
from headphones.exceptions import ex

import lib.simplejson as simplejson

Expand Down Expand Up @@ -105,7 +106,7 @@ def checkGithub():

# Get the latest commit available from github
url = 'https://api.github.com/repos/%s/headphones/commits/%s' % (headphones.GIT_USER, headphones.GIT_BRANCH)
logger.info ('Retrieving latest version information from github')
logger.info('Retrieving latest version information from github')
try:
result = urllib2.urlopen(url).read()
git = simplejson.JSONDecoder().decode(result)
Expand Down Expand Up @@ -201,7 +202,7 @@ def update():
# Find update dir name
update_dir_contents = [x for x in os.listdir(update_dir) if os.path.isdir(os.path.join(update_dir, x))]
if len(update_dir_contents) != 1:
logger.error(u"Invalid update data, update failed: "+str(update_dir_contents))
logger.error("Invalid update data, update failed: "+str(update_dir_contents))
return
content_dir = os.path.join(update_dir, update_dir_contents[0])

Expand All @@ -222,5 +223,5 @@ def update():
ver_file.write(headphones.LATEST_VERSION)
ver_file.close()
except IOError, e:
logger.error(u"Unable to write current version to version.txt, update not complete: "+ex(e))
logger.error("Unable to write current version to version.txt, update not complete: "+ex(e))
return

0 comments on commit 9365a3e

Please sign in to comment.