ContentManager.py formatting
This commit is contained in:
parent
f719b89a7a
commit
bed66cdcd2
1 changed files with 10 additions and 9 deletions
|
@ -77,7 +77,8 @@ class ContentManager(object):
|
||||||
for relative_path, info in new_content.get("files_optional", {}).iteritems():
|
for relative_path, info in new_content.get("files_optional", {}).iteritems():
|
||||||
file_inner_path = content_inner_dir + relative_path
|
file_inner_path = content_inner_dir + relative_path
|
||||||
new_hash = info["sha512"]
|
new_hash = info["sha512"]
|
||||||
if old_content and old_content.get("files_optional", {}).get(relative_path): # We have the file in the old content
|
if old_content and old_content.get("files_optional", {}).get(relative_path):
|
||||||
|
# We have the file in the old content
|
||||||
old_hash = old_content["files_optional"][relative_path].get("sha512")
|
old_hash = old_content["files_optional"][relative_path].get("sha512")
|
||||||
if old_hash != new_hash and self.site.settings.get("autodownloadoptional"):
|
if old_hash != new_hash and self.site.settings.get("autodownloadoptional"):
|
||||||
changed.append(content_inner_dir + relative_path) # Download new file
|
changed.append(content_inner_dir + relative_path) # Download new file
|
||||||
|
@ -363,7 +364,7 @@ class ContentManager(object):
|
||||||
|
|
||||||
# Get diffs for changed files
|
# Get diffs for changed files
|
||||||
def getDiffs(self, inner_path, limit=30 * 1024, update_files=True):
|
def getDiffs(self, inner_path, limit=30 * 1024, update_files=True):
|
||||||
if not inner_path in self.contents:
|
if inner_path not in self.contents:
|
||||||
return None
|
return None
|
||||||
diffs = {}
|
diffs = {}
|
||||||
content_inner_path_dir = helper.getDirname(inner_path)
|
content_inner_path_dir = helper.getDirname(inner_path)
|
||||||
|
|
Loading…
Reference in a new issue