unpack run result tuple to get code

rtd2
Dan Colish 2011-09-09 19:16:39 -07:00
parent c6d21f0776
commit 40508962a7
1 changed files with 3 additions and 3 deletions

View File

@ -47,16 +47,16 @@ class Backend(BaseVCS):
branch = self.fallback_branch
if self.default_branch:
branch = self.default_branch
reset_output = self.run('git', 'reset', '--hard',
code, out, err = self.run('git', 'reset', '--hard',
'origin/%s' % branch)
if reset_output[0] != 0:
if code != 0:
print "Failed to get code from '%s' (git reset): %s" % (
self.repo_url, code)
print "Going on because this might not be horrible."
#raise ProjectImportError(
#"Failed to get code from '%s' (git reset): %s" % (self.repo_url, retcode)
#)
return reset_output
return [code, out, err]
def clone(self):
code, out, err = self.run('git', 'clone', '--quiet',