ContentManager.py formatting

This commit is contained in:
ZeroNet 2016-08-10 12:58:19 +02:00
parent f719b89a7a
commit bed66cdcd2

View file

@ -77,7 +77,8 @@ class ContentManager(object):
for relative_path, info in new_content.get("files_optional", {}).iteritems():
file_inner_path = content_inner_dir + relative_path
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")
if old_hash != new_hash and self.site.settings.get("autodownloadoptional"):
changed.append(content_inner_dir + relative_path) # Download new file
@ -363,7 +364,7 @@ class ContentManager(object):
# Get diffs for changed files
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
diffs = {}
content_inner_path_dir = helper.getDirname(inner_path)