From: Zooko O'Whielacronx Date: Mon, 11 Jun 2007 18:59:57 +0000 (-0700) Subject: catch EnvironmentError from attempt to invoke darcs using subprocess module X-Git-Tag: allmydata-tahoe-0.4.0~56 X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/reliability?a=commitdiff_plain;h=c3cdb81c6506203eaedfd79692d620f0c3d17230;p=tahoe-lafs%2Ftahoe-lafs.git catch EnvironmentError from attempt to invoke darcs using subprocess module --- diff --git a/misc/make-version.py b/misc/make-version.py index f52d5445..49c60ca2 100644 --- a/misc/make-version.py +++ b/misc/make-version.py @@ -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