Just use the raise statement alone to re-raise exceptions.
authorZac Medico <zmedico@gentoo.org>
Tue, 11 Jul 2006 00:59:10 +0000 (00:59 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 11 Jul 2006 00:59:10 +0000 (00:59 -0000)
svn path=/main/trunk/; revision=3835

pym/portage_checksum.py

index fd659eea2fe3ba63788a05a7ea7a406897556560..41b3360664bc51a1fb0c5972bbe05cedc3fc6033 100644 (file)
@@ -146,7 +146,7 @@ def perform_checksum(filename, hashname="MD5", calc_prelink=0):
                if e.errno == errno.ENOENT:
                        raise portage_exception.FileNotFound(myfilename)
                else:
-                       raise e
+                       raise
        if calc_prelink and prelink_capable:
                try:
                        os.unlink(prelink_tmpfile)
@@ -154,7 +154,7 @@ def perform_checksum(filename, hashname="MD5", calc_prelink=0):
                        if oe.errno == errno.ENOENT:
                                pass
                        else:
-                               raise oe
+                               raise
                portage_locks.unlockfile(mylock)
 
        return (myhash,mysize)