Make tbz2.get_data() return an empty dict on failure.
authorZac Medico <zmedico@gentoo.org>
Tue, 29 Sep 2009 05:56:39 +0000 (05:56 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 29 Sep 2009 05:56:39 +0000 (05:56 -0000)
svn path=/main/trunk/; revision=14460

pym/portage/xpak.py

index a9e15b56314627004a79eaa0b68d2dfd4a3e1325..262f14c854a0f17e4eacb43cb3cc15282b4db183 100644 (file)
@@ -436,7 +436,7 @@ class tbz2(object):
        def get_data(self):
                """Returns all the files from the dataSegment as a map object."""
                if not self.scan():
-                       return 0
+                       return {}
                a = open(_unicode_encode(self.file,
                        encoding=_encodings['fs'], errors='strict'), 'rb')
                mydata = {}