mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-08 03:14:21 +00:00
catch EnvironmentError from attempt to invoke darcs using subprocess module
This commit is contained in:
parent
466083700f
commit
c3cdb81c65
@ -70,9 +70,14 @@ def update():
|
||||
print "no _darcs/ but no version.py either: how did you get this tree?"
|
||||
return 0
|
||||
cmd = ["darcs", "changes", "--from-tag=^allmydata-tahoe", "--xml-output"]
|
||||
p = Popen(cmd, stdout=PIPE)
|
||||
output = p.communicate()[0]
|
||||
rc = p.returncode
|
||||
try:
|
||||
p = Popen(cmd, stdout=PIPE)
|
||||
output = p.communicate()[0]
|
||||
rc = p.returncode
|
||||
except EnvironmentError, le:
|
||||
output = "There was an environment error: %s" % (le,)
|
||||
rc = -1
|
||||
|
||||
if rc != 0:
|
||||
print "unable to run 'darcs changes':"
|
||||
print output
|
||||
|
Loading…
x
Reference in New Issue
Block a user