ох уж эти contextmanager-ы

This commit is contained in:
gitadmin committed 2016-03-12 15:08:48 +03:00
1 parent bc60c003e6
commit 6b43a7f208
1 file changed
+1 -1
+1 -1
View File
@@ -21,7 +21,7 @@ def shelf(filename, ttl=0):
with LOCKS.get(filename, threading.RLock()):
with closing(shelve.open(filename, writeback=True)) as d:
import time
if not d:
if not dict(d):
d.update({
"created_at": time.time(),
"data": {},