merge
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Sat, 27 Sep 2008 15:17:37 +0100
changeset 3720 e09a1bd54909
parent 3719 3307abd75322 (diff)
parent 3718 f22f8ab3f6f5 (current diff)
child 3721 3748390f3608
merge
--- a/bindings/python/wscript	Thu Sep 25 15:50:07 2008 -0700
+++ b/bindings/python/wscript	Sat Sep 27 15:17:37 2008 +0100
@@ -55,19 +55,29 @@
         rev = "-rrevno:%i" % REQUIRED_PYBINDGEN_VERSION[3]
     else:
         rev = "-rtag:%s" % '.'.join([str(x) for x in REQUIRED_PYBINDGEN_VERSION])
+        
     if os.path.exists(LOCAL_PYBINDGEN_PATH):
-        print "Trying to update pybindgen; this will fail if no network connection is available."
+        print "Trying to update pybindgen; this will fail if no network connection is available.  Hit Ctrl-C to skip."
 
         cmd = [bzr, "pull", rev, PYBINDGEN_BRANCH]
         print " => ", ' '.join(cmd)
-        if subprocess.Popen(cmd, cwd=LOCAL_PYBINDGEN_PATH).wait():
+        try:
+            if subprocess.Popen(cmd, cwd=LOCAL_PYBINDGEN_PATH).wait():
+                return False
+        except KeyboardInterrupt:
+            print "Interrupted; Python bindings will be disabled."
             return False
         print "Update was successful."
     else:
-        print "Trying to fetch pybindgen; this will fail if no network connection is available."
+        print "Trying to fetch pybindgen; this will fail if no network connection is available.  Hit Ctrl-C to skip."
         cmd = [bzr, "checkout", rev, PYBINDGEN_BRANCH, LOCAL_PYBINDGEN_PATH]
         print " => ", ' '.join(cmd)
-        if subprocess.Popen(cmd).wait():
+        try:
+            if subprocess.Popen(cmd).wait():
+                return False
+        except KeyboardInterrupt:
+            print "Interrupted; Python bindings will be disabled."
+            shutil.rmtree(LOCAL_PYBINDGEN_PATH, True)
             return False
         print "Fetch was successful."