]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
Properly handle interrupted build processes.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 24 Jan 2013 00:30:03 +0000 (01:30 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 24 Jan 2013 00:30:03 +0000 (01:30 +0100)
When a build has been interrupted by the user (Ctrl-C),
a debugging shell has been entered.
That's not what a user would expect, so we just end the
build process.

python/pakfire/builder.py

index 16cef3840c223961536ae58cf5bc6ad10e531fbe..e821757149d3ff23223e2b2619e902ec490ca54f 100644 (file)
@@ -764,6 +764,12 @@ class BuildEnviron(object):
                        error = True
                        self.log.error(_("Build failed"))
 
+               except KeyboardInterrupt:
+                       error = True
+                       self.log.error(_("Build interrupted"))
+
+                       raise
+
                # Catch all other errors.
                except:
                        error = True