projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
716b186
)
PreservedLibsRegistry: try to parse as JSON first
author
Zac Medico
<zmedico@gentoo.org>
Thu, 22 Mar 2012 15:23:51 +0000
(08:23 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Thu, 22 Mar 2012 15:23:51 +0000
(08:23 -0700)
pym/portage/util/_dyn_libs/PreservedLibsRegistry.py
patch
|
blob
|
history
diff --git
a/pym/portage/util/_dyn_libs/PreservedLibsRegistry.py
b/pym/portage/util/_dyn_libs/PreservedLibsRegistry.py
index d774f80678eeeabae1de8f6014f46c15e438926f..d3d100f187eb99b8818eece024d80b986f913245 100644
(file)
--- a/
pym/portage/util/_dyn_libs/PreservedLibsRegistry.py
+++ b/
pym/portage/util/_dyn_libs/PreservedLibsRegistry.py
@@
-92,13
+92,13
@@
class PreservedLibsRegistry(object):
# content is empty if it's an empty lock file
if content:
try:
- self._data = pickle.loads(content)
+ self._data = json.loads(_unicode_decode(content,
+ encoding=_encodings['repo.content'], errors='strict'))
except SystemExit:
raise
except Exception as e:
try:
- self._data = json.loads(_unicode_decode(content,
- encoding=_encodings['repo.content'], errors='strict'))
+ self._data = pickle.loads(content)
except SystemExit:
raise
except Exception: