From eef3ee7168fbf38bb5ef56a47fee0c0873cd4540 Mon Sep 17 00:00:00 2001 From: Jauhien Piatlicki Date: Fri, 17 Apr 2015 09:27:02 +0200 Subject: [g_sorcery] fix DB cleaning do not write empty DB on cleaning, so syncing with old (v. 0) DBs works --- g_sorcery/db_layout.py | 1 + g_sorcery/package_db.py | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/g_sorcery/db_layout.py b/g_sorcery/db_layout.py index fe6f281..ea4298a 100644 --- a/g_sorcery/db_layout.py +++ b/g_sorcery/db_layout.py @@ -230,6 +230,7 @@ class DBLayout(object): """ if os.path.exists(self.directory): shutil.rmtree(self.directory) + os.makedirs(self.directory) def read(self): """ diff --git a/g_sorcery/package_db.py b/g_sorcery/package_db.py index 5eeeb63..ec2d45f 100644 --- a/g_sorcery/package_db.py +++ b/g_sorcery/package_db.py @@ -216,7 +216,6 @@ class PackageDB(object): """ self.db_layout.clean() self.reset_db() - self.write() def write(self): -- cgit v1.2.3-65-gdbad