Black all files
This commit is contained in:
1 parent
03bd7753e5
commit
f05b199925
6 files changed
+231
-233
No files matched your search
@@ -23,8 +23,7 @@ class Cache(dict):
|
||||
def __init__(self, django_folder, cache_path):
|
||||
self.django_folder = django_folder
|
||||
project_name = split_path(django_folder)[-2]
|
||||
self.filename = \
|
||||
os.path.join(cache_path, '{0}.pickle'.format(project_name))
|
||||
self.filename = os.path.join(cache_path, "{0}.pickle".format(project_name))
|
||||
|
||||
if not os.path.exists(os.path.dirname(self.filename)):
|
||||
os.makedirs(os.path.dirname(self.filename))
|
||||
@@ -33,14 +32,14 @@ class Cache(dict):
|
||||
|
||||
def load(self):
|
||||
try:
|
||||
with open(self.filename, 'rb') as f:
|
||||
with open(self.filename, "rb") as f:
|
||||
tmp_dict = pickle.load(f)
|
||||
self.update(tmp_dict)
|
||||
except IOError:
|
||||
pass
|
||||
|
||||
def save(self):
|
||||
with open(self.filename, 'wb') as f:
|
||||
with open(self.filename, "wb") as f:
|
||||
pickle.dump(self, f, protocol=2)
|
||||
|
||||
def md5(self, app_name, migration):
|
||||
|
||||
Reference in new issue
Block a user