diff options
Diffstat (limited to 'pym/portage/__init__.py')
-rw-r--r-- | pym/portage/__init__.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 68a6f63f9..5326a0acd 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -7426,7 +7426,7 @@ def commit_mtimedb(mydict=None, filename=None): d = {} # for full backward compat, pickle it as a plain dict object. d.update(mydict) try: - f = atomic_ofstream(filename) + f = atomic_ofstream(filename, mode='wb') pickle.dump(d, f, -1) f.close() portage.util.apply_secpass_permissions(filename, uid=uid, gid=portage_gid, mode=0664) @@ -7591,9 +7591,8 @@ class MtimeDB(dict): def _load(self, filename): try: - f = open(filename) + f = open(filename, 'rb') mypickle = pickle.Unpickler(f) - mypickle.find_global = None d = mypickle.load() f.close() del f |