ignore closing file error when file not open

fixes #16268
This commit is contained in:
Brian Coca 2016-06-14 09:33:45 -04:00
parent 2d042d73b0
commit 07846f7bec

View file

@ -101,7 +101,10 @@ class CacheModule(BaseCacheModule):
else: else:
f.write(jsonify(value)) f.write(jsonify(value))
finally: finally:
f.close() try:
f.close()
except UnboundLocalError:
pass
def has_expired(self, key): def has_expired(self, key):