diff options
author | 2015-04-17 09:27:02 +0200 | |
---|---|---|
committer | 2015-04-17 09:27:02 +0200 | |
commit | eef3ee7168fbf38bb5ef56a47fee0c0873cd4540 (patch) | |
tree | 9a3ffbe7a1132d68d4146ef292f4bf67c5c90b33 | |
parent | change DB structure (diff) | |
download | g-sorcery-eef3ee7168fbf38bb5ef56a47fee0c0873cd4540.tar.gz g-sorcery-eef3ee7168fbf38bb5ef56a47fee0c0873cd4540.tar.bz2 g-sorcery-eef3ee7168fbf38bb5ef56a47fee0c0873cd4540.zip |
[g_sorcery] fix DB cleaning
do not write empty DB on cleaning,
so syncing with old (v. 0) DBs works
-rw-r--r-- | g_sorcery/db_layout.py | 1 | ||||
-rw-r--r-- | g_sorcery/package_db.py | 1 |
2 files changed, 1 insertions, 1 deletions
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): |