From 6e904190143c0bcdb9efb97b7c14c3db9c4bf6a6 Mon Sep 17 00:00:00 2001 From: rembo10 Date: Thu, 17 Apr 2014 20:44:28 -0700 Subject: [PATCH] Don't need to get commits behind if current version == latest version (versioncheck.py) --- headphones/versioncheck.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/headphones/versioncheck.py b/headphones/versioncheck.py index d8ab0f87..e7bd8fd8 100644 --- a/headphones/versioncheck.py +++ b/headphones/versioncheck.py @@ -136,6 +136,10 @@ def checkGithub(): logger.info('You are running an unknown version of Headphones. Run the updater to identify your version') return headphones.LATEST_VERSION + if headphones.LATEST_VERSION == headphones.CURRENT_VERSION: + logger.info('Headphones is up to date') + return headphones.LATEST_VERSION + logger.info('Comparing currently installed version with latest GitHub version') url = 'https://api.github.com/repos/%s/headphones/compare/%s...%s' % (headphones.GIT_USER, headphones.LATEST_VERSION, headphones.CURRENT_VERSION) commits = request.request_json(url, timeout=20, whitelist_status_code=404, validator=lambda x: type(x) == dict)