Code improvement

This commit is contained in:
Koen van Zuijlen 2020-12-30 17:12:32 +01:00
parent e9bef6db68
commit 36b2eeb297

View file

@ -785,7 +785,7 @@ class _ShelfCacheBackend:
"""Used as a backend for caching cacheable requests."""
def __init__(self, file_path=None, flag=None):
if flag:
if flag is not None:
self.shelf = shelve.open(file_path, flag=flag)
else:
self.shelf = shelve.open(file_path)