Code cleanup

* Streamline variable assignment
* Replace assignment with augmented assignment
* Remove unused variables and redundant parentheses
This commit is contained in:
Labrys 2016-06-05 02:31:04 -04:00
parent 47c585d81c
commit 94e8a45c62
11 changed files with 39 additions and 58 deletions

View file

@ -159,12 +159,13 @@ class GitUpdateManager(UpdateManager):
def _run_git(self, git_path, args):
output = err = exit_status = None
output = None
err = None
if not git_path:
logger.log(u"No git specified, can't use git commands", logger.DEBUG)
exit_status = 1
return (output, err, exit_status)
return output, err, exit_status
cmd = git_path + ' ' + args
@ -203,7 +204,7 @@ class GitUpdateManager(UpdateManager):
logger.log(cmd + u" returned : " + output + u", treat as error for now", logger.DEBUG)
exit_status = 1
return (output, err, exit_status)
return output, err, exit_status
def _find_installed_version(self):
"""