From 0b4cf4cc31684bd1800fd1588f7114d8fe45d137 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 22 Mar 2012 08:23:51 -0700 Subject: [PATCH] PreservedLibsRegistry: try to parse as JSON first --- pym/portage/util/_dyn_libs/PreservedLibsRegistry.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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: -- 2.26.2