diff options
author | Siddharth Ravikumar <sravik@bgsu.edu> | 2015-03-18 21:42:44 -0400 |
---|---|---|
committer | Siddharth Ravikumar <sravik@bgsu.edu> | 2015-03-18 21:42:44 -0400 |
commit | b83c93457ff73a02ba48e5422386b3c1b0534abe (patch) | |
tree | 4ac319d61f0cd897f9f51c9fc709c2ae21ae5b6f | |
parent | 427233bd9ac3a51c5e0d4df70e0b6c0bedd0ea56 (diff) |
combox/silo.py: modded remove method in ComboxSilo
The statement that removes the key from db is now put in a try-catch
f#*king block.
-rw-r--r-- | combox/silo.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/combox/silo.py b/combox/silo.py index 21b473d..e08eafc 100644 --- a/combox/silo.py +++ b/combox/silo.py @@ -66,7 +66,11 @@ class ComboxSilo(object): filep: path to the file in combox directory. """ - return self.db.rem(filep) + try: + return self.db.rem(filep) + except KeyError, e: + # means `filep' not present in db. + return False def exists(self, filep): |