Permalink
Browse files

Closing the shelve like a good pythonista

  • Loading branch information...
davej committed Mar 18, 2010
1 parent efb24c9 commit ee092c3c9216f64ee815c05e2772257dfa9cff3f
Showing with 1 addition and 0 deletions.
  1. +1 −0 tinchy.py
View
@@ -32,6 +32,7 @@ def make_tinchy_url():
def redirect_to_fatty_url(tinchy_id):
storage = shelve.open("tinchy")
if tinchy_id not in storage:
+ storage.close()
return "Nope, this tinchy URL wasn't found."
fatty_url = storage[tinchy_id]
storage.close()

0 comments on commit ee092c3

Please sign in to comment.