Formatting

This commit is contained in:
HelloZeroNet 2016-04-20 23:30:25 +02:00
parent 38057c2e03
commit 23389dc31e

View file

@ -10,7 +10,6 @@ import struct
import socket
import urllib
import urllib2
import cStringIO as StringIO
import gevent
@ -446,9 +445,9 @@ class Site(object):
# Publish more peers in the backgroup
self.log.info(
"Successfuly %s published to %s peers, publishing to %s more peers in the background" % (
inner_path, len(published), limit
))
"Successfuly %s published to %s peers, publishing to %s more peers in the background" %
(inner_path, len(published), limit)
)
for thread in range(2):
gevent.spawn(self.publisher, inner_path, peers, published, limit=limit * 2)
@ -505,7 +504,8 @@ class Site(object):
# If -default in path, create a -default less copy of the file
if "-default" in file_inner_path:
file_path_dest = new_site.storage.getPath(file_inner_path.replace("-default", ""))
if new_site.storage.isFile(file_inner_path.replace("-default", "")) and not overwrite: # Don't overwrite site files with default ones
if new_site.storage.isFile(file_inner_path.replace("-default", "")) and not overwrite:
# Don't overwrite site files with default ones
self.log.debug("[SKIP] Default file: %s (already exist)" % file_inner_path)
continue
self.log.debug("[COPY] Default file: %s to %s..." % (file_inner_path, file_path_dest))