]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
naoki: Improve error output of broken and unknown packages.
authorSchantl Stefan <Stevee@ipfire.org>
Sun, 28 Nov 2010 17:51:31 +0000 (18:51 +0100)
committerSchantl Stefan <Stevee@ipfire.org>
Sun, 28 Nov 2010 17:51:31 +0000 (18:51 +0100)
naoki/packages.py

index f38afec431ebfcab8f3f61b764954039b3e16bc7..0c66ef5cf4a13e5af5a6daddcf9fde008414e0a3 100644 (file)
@@ -209,7 +209,11 @@ class BinaryPackage(Package):
                return ret
 
        def _readfile(self, name):
-               f = io.CpioArchive(self.filename)
+               try:
+                       f = io.CpioArchive(self.filename)
+               except ValueError, e:
+                       raise Exception, "Could not open package '%s' correctly: %s" \
+                               % (self.filename, e)
 
                # If file is not available, return None
                ret = None