Formatting

This commit is contained in:
shortcutme 2016-11-07 22:50:33 +01:00
parent 5ff31e7cb4
commit 38838b94a2

View file

@ -81,7 +81,7 @@ def packPeers(peers):
packed_peers["onion"].append(peer.packMyAddress())
else:
packed_peers["ip4"].append(peer.packMyAddress())
except Exception, err:
except Exception:
logging.error("Error packing peer address: %s" % peer)
return packed_peers
@ -112,14 +112,15 @@ def unpackOnionAddress(packed):
# Return: data/site/content.json -> data/site
def getDirname(path):
if "/" in path:
return path[:path.rfind("/")+1]
return path[:path.rfind("/") + 1]
else:
return ""
# Get dir from file
# Return: data/site/content.json -> content.json
def getFilename(path):
return path[path.rfind("/")+1:]
return path[path.rfind("/") + 1:]
# Convert hash to hashid for hashfield