Skip to content

Commit

Permalink
Handle exceptions explicitly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Renelvon committed Oct 1, 2014
1 parent 3b41c7c commit 7bfd028
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions node/datastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,11 @@ def keys(self):
keys = []
try:
db_keys = self.db.selectEntries("datastore")

for row in db_keys:
keys.append(row['key'].decode('hex'))

finally:
# self.log.info('Keys: %s' % keys)
return keys
except:
pass
return keys

def lastPublished(self, key):
""" Get the time the C{(key, value)} pair identified by C{key}
Expand Down Expand Up @@ -241,13 +239,11 @@ def keys(self):
keys = []
try:
db_keys = self.db.selectEntries("datastore")

for row in db_keys:
keys.append(row['key'].decode('hex'))

finally:
# self.log.info('Keys: %s' % keys)
return keys
except:
pass
return keys

def lastPublished(self, key):
""" Get the time the C{(key, value)} pair identified by C{key}
Expand Down

0 comments on commit 7bfd028

Please sign in to comment.