From a111aaac463926dcfc46821a0f3b64bb08db3711 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 2 Feb 2019 14:29:05 +0530 Subject: [PATCH] unlink log on remove --- oml/library.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/oml/library.py b/oml/library.py index 274f00c..94e30e8 100644 --- a/oml/library.py +++ b/oml/library.py @@ -208,8 +208,9 @@ class Peer(object): def remove(self): self.join() - os.unlink(self._dbpath) - os.unlink(self._infopath) + for path in (self._dbpath, self._logpath, self._infopath): + if os.path.exists(path): + os.unlink(path) def sync_db(self): import item.models