Merge branch 'jh/p4-fix-use-of-process-error-exception'
* jh/p4-fix-use-of-process-error-exception: git-p4: fix instantiation of CalledProcessError
This commit is contained in:
commit
8b9c425629
@ -406,7 +406,7 @@ def system(cmd, ignore_error=False):
|
|||||||
sys.stderr.write("executing %s\n" % str(cmd))
|
sys.stderr.write("executing %s\n" % str(cmd))
|
||||||
retcode = subprocess.call(cmd, shell=expand)
|
retcode = subprocess.call(cmd, shell=expand)
|
||||||
if retcode and not ignore_error:
|
if retcode and not ignore_error:
|
||||||
raise CalledProcessError(retcode, cmd)
|
raise subprocess.CalledProcessError(retcode, cmd)
|
||||||
|
|
||||||
return retcode
|
return retcode
|
||||||
|
|
||||||
@ -416,7 +416,7 @@ def p4_system(cmd):
|
|||||||
expand = not isinstance(real_cmd, list)
|
expand = not isinstance(real_cmd, list)
|
||||||
retcode = subprocess.call(real_cmd, shell=expand)
|
retcode = subprocess.call(real_cmd, shell=expand)
|
||||||
if retcode:
|
if retcode:
|
||||||
raise CalledProcessError(retcode, real_cmd)
|
raise subprocess.CalledProcessError(retcode, real_cmd)
|
||||||
|
|
||||||
def die_bad_access(s):
|
def die_bad_access(s):
|
||||||
die("failure accessing depot: {0}".format(s.rstrip()))
|
die("failure accessing depot: {0}".format(s.rstrip()))
|
||||||
@ -4110,7 +4110,7 @@ def run(self, args):
|
|||||||
init_cmd.append("--bare")
|
init_cmd.append("--bare")
|
||||||
retcode = subprocess.call(init_cmd)
|
retcode = subprocess.call(init_cmd)
|
||||||
if retcode:
|
if retcode:
|
||||||
raise CalledProcessError(retcode, init_cmd)
|
raise subprocess.CalledProcessError(retcode, init_cmd)
|
||||||
|
|
||||||
if not P4Sync.run(self, depotPaths):
|
if not P4Sync.run(self, depotPaths):
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user