Only increment bad_file if internet connection is active

This commit is contained in:
shortcutme 2017-02-19 00:52:20 +01:00
parent 45e2b350a9
commit 2eef0bded1
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -1055,7 +1055,7 @@ class Site(object):
if inner_path == "content.json": if inner_path == "content.json":
self.content_updated = False self.content_updated = False
self.log.debug("Can't update content.json") self.log.debug("Can't update content.json")
if inner_path in self.bad_files: if inner_path in self.bad_files and self.connection_server.has_internet:
self.bad_files[inner_path] = self.bad_files.get(inner_path, 0) + 1 self.bad_files[inner_path] = self.bad_files.get(inner_path, 0) + 1
self.updateWebsocket(file_failed=inner_path) self.updateWebsocket(file_failed=inner_path)