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>
Thu, 26 May 2011 06:12:38 +0000 (23:12 -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 7d071e42e3828186d9d96efd4c7161add4a7e4b3..60b9575a91dba7110c8c40110249dd27f1bc8005 100644 (file)
@@ -470,8 +470,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):
        """