From a7c45ed1ceb2f0dbc4653d71862a151f09ea7d8f Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@cd1c1023-2f26-0410-ae45-c471fc1f0318> Date: Fri, 16 Nov 2007 10:56:31 +0000 Subject: [PATCH] fix a small bug with database close in gentoosync git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@696 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- client/rescueTools.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/rescueTools.py b/client/rescueTools.py index e57d4b47d..1ad654fbb 100644 --- a/client/rescueTools.py +++ b/client/rescueTools.py @@ -356,7 +356,6 @@ def database(options): atom = clientDbconn.retrieveAtom(x) print_info(brown(" @@ ")+blue("Removing from database: ")+red(atom), back = True) clientDbconn.removePackage(x) - clientDbconn.closeDB() print_info(brown(" @@ ")+blue("Database removal complete.")) if (toBeAdded): @@ -371,6 +370,8 @@ def database(options): for item in toBeAdded: counter = item[1] atom = item[0] + if not os.path.isdir(etpConst['entropyunpackdir']): + os.makedirs(etpConst['entropyunpackdir']) temptbz2 = etpConst['entropyunpackdir']+"/"+atom.split("/")[1]+".tbz2" if os.path.isfile(temptbz2): os.remove(temptbz2) @@ -406,7 +407,8 @@ def database(options): os.remove(temptbz2) print_info(brown(" @@ ")+blue("Database update completed.")) - + + clientDbconn.closeDB() return 0 else: