From c3cdb81c6506203eaedfd79692d620f0c3d17230 Mon Sep 17 00:00:00 2001 From: Zooko O'Whielacronx Date: Mon, 11 Jun 2007 11:59:57 -0700 Subject: [PATCH] catch EnvironmentError from attempt to invoke darcs using subprocess module --- misc/make-version.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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 -- 2.45.2