Rev2167, Skip downloading if no connection server specified

This commit is contained in:
shortcutme 2017-07-28 22:57:41 +02:00
parent fa96ab453f
commit 6610914fdb
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 5 additions and 1 deletions

View file

@ -10,7 +10,7 @@ class Config(object):
def __init__(self, argv): def __init__(self, argv):
self.version = "0.5.7" self.version = "0.5.7"
self.rev = 2166 self.rev = 2167
self.argv = argv self.argv = argv
self.action = None self.action = None
self.config_file = "zeronet.conf" self.config_file = "zeronet.conf"

View file

@ -265,6 +265,10 @@ class Site(object):
# Download all files of the site # Download all files of the site
@util.Noparallel(blocking=False) @util.Noparallel(blocking=False)
def download(self, check_size=False, blind_includes=False): def download(self, check_size=False, blind_includes=False):
if not self.connection_server:
self.log.debug("No connection server found, skipping download")
return False
self.log.debug( self.log.debug(
"Start downloading, bad_files: %s, check_size: %s, blind_includes: %s" % "Start downloading, bad_files: %s, check_size: %s, blind_includes: %s" %
(self.bad_files, check_size, blind_includes) (self.bad_files, check_size, blind_includes)