From ac0e1ca28e858b82a94fb6333f1b45b8eb569d65 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Fri, 6 Dec 2013 11:24:33 +0100 Subject: [PATCH] [solo.commands._manage] make _show_preserved_libraries process and thread safe --- client/solo/commands/_manage.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/solo/commands/_manage.py b/client/solo/commands/_manage.py index cc20a389b..945b740de 100644 --- a/client/solo/commands/_manage.py +++ b/client/solo/commands/_manage.py @@ -122,12 +122,14 @@ class SoloManage(SoloCommand): def _show_preserved_libraries(self, entropy_client): """ Inform User about preserved libraries living on the filesystem. + This method is process and thread safe. """ inst_repo = entropy_client.installed_repository() - preserved_mgr = PreservedLibraries( - inst_repo, None, frozenset(), root=etpConst['systemroot']) + with inst_repo.shared(): + preserved_mgr = PreservedLibraries( + inst_repo, None, frozenset(), root=etpConst['systemroot']) - preserved = preserved_mgr.list() + preserved = preserved_mgr.list() if preserved: mytxt = ngettext(