[Piuparts-commits] rev 356 - in trunk: . debian

Holger Levsen holger at alioth.debian.org
Sat Apr 18 09:57:29 UTC 2009


Author: holger
Date: 2009-04-18 09:57:29 +0000 (Sat, 18 Apr 2009)
New Revision: 356

Modified:
   trunk/debian/changelog
   trunk/piuparts.py
Log:
allow the user to stop it with control-C. Thanks to Carl Chenet for the
patch. (Closes: #523958)

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2009-04-18 09:18:43 UTC (rev 355)
+++ trunk/debian/changelog	2009-04-18 09:57:29 UTC (rev 356)
@@ -17,6 +17,8 @@
     - add advice how to read the logfile to the top of the logfiles produced.
     - add "FAIL: " to logging output for seven more failure types, so that it
       becomes easier to group failure causes.
+    - allow the user to stop it with control-C. Thanks to Carl Chenet for the
+      patch. (Closes: #523958)
   * piupartslib/packagesdb.py:
     - change the test whether a package is testable to check whether the 
       package is of priority "required", and not whether it's "Essential".

Modified: trunk/piuparts.py
===================================================================
--- trunk/piuparts.py	2009-04-18 09:18:43 UTC (rev 355)
+++ trunk/piuparts.py	2009-04-18 09:57:29 UTC (rev 356)
@@ -2019,8 +2019,13 @@
 
 
 if __name__ == "__main__":
-    if sys.argv[1:] == ["unittest"]:
-        del sys.argv[1]
-        unittest.main()
-    else:
-        main()
+    try:
+        if sys.argv[1:] == ["unittest"]:
+            del sys.argv[1]
+            unittest.main()
+        else:
+            main()
+    except KeyboardInterrupt:
+        print ''
+        print 'Piuparts interrupted by the user, exiting...'
+        sys.exit(1)




More information about the Piuparts-commits mailing list