From: Zac Medico Date: Thu, 22 Mar 2012 15:23:51 +0000 (-0700) Subject: PreservedLibsRegistry: try to parse as JSON first X-Git-Tag: v2.2.0_alpha94~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0b4cf4cc31684bd1800fd1588f7114d8fe45d137;p=portage.git PreservedLibsRegistry: try to parse as JSON first --- diff --git a/pym/portage/util/_dyn_libs/PreservedLibsRegistry.py b/pym/portage/util/_dyn_libs/PreservedLibsRegistry.py index d774f8067..d3d100f18 100644 --- 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: