Make sure portage.VERSION is saved in the mtimedb as type str rather than
authorZac Medico <zmedico@gentoo.org>
Sat, 27 Mar 2010 22:13:02 +0000 (15:13 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 27 Mar 2010 22:13:02 +0000 (15:13 -0700)
ObjectProxy.

pym/portage/util/mtimedb.py

index 660e9d69f1881d99c64bfb176cc76553115b4389..175bd8f46e12c71c4b318c50ff7bc1ec3fa8e3fb 100644 (file)
@@ -5,7 +5,8 @@ __all__ = ['MtimeDB']
 
 import copy
 
-from portage import pickle, VERSION, _unicode_encode
+import portage
+from portage import pickle, _unicode_encode
 from portage.data import portage_gid, uid
 from portage.localization import _
 from portage.util import apply_secpass_permissions, atomic_ofstream, writemsg
@@ -63,7 +64,7 @@ class MtimeDB(dict):
                d.update(self)
                # Only commit if the internal state has changed.
                if d != self._clean_data:
-                       d["version"] = VERSION
+                       d["version"] = str(portage.VERSION)
                        try:
                                f = atomic_ofstream(self.filename, mode='wb')
                        except EnvironmentError: