writedict: raise any exceptions
authorZac Medico <zmedico@gentoo.org>
Wed, 25 May 2011 04:55:59 +0000 (21:55 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 25 May 2011 04:55:59 +0000 (21:55 -0700)
We don't have any code that checks the writedict return value, so we'd
better raise an exception if it fails.

pym/portage/util/__init__.py

index 3cf6c5bab9b58635c5bdee03feb7e390f4a57d68..0dff25ff82443454cccc928976b08d029bf051a4 100644 (file)
@@ -505,8 +505,7 @@ def writedict(mydict,myfilename,writekey=True):
        except IOError:
                if myfile is not None:
                        myfile.abort()
-               return 0
-       return 1
+               raise
 
 def shlex_split(s):
        """