MCPcopy
hub / github.com/HelloZeroNet/ZeroNet / fileFailed

Method fileFailed

src/Site/Site.py:1076–1086  ·  view source on GitHub ↗
(self, inner_path)

Source from the content-addressed store, hash-verified

1074
1075 # File download failed
1076 def fileFailed(self, inner_path):
1077 if inner_path == "content.json":
1078 self.content_updated = False
1079 self.log.debug("Can't update content.json")
1080 if inner_path in self.bad_files and self.connection_server.has_internet:
1081 self.bad_files[inner_path] = self.bad_files.get(inner_path, 0) + 1
1082
1083 self.updateWebsocket(file_failed=inner_path)
1084
1085 if self.bad_files.get(inner_path, 0) > 30:
1086 self.fileForgot(inner_path)
1087
1088 def fileForgot(self, inner_path):
1089 self.log.debug("Giving up on %s" % inner_path)

Callers 1

addEventListenersMethod · 0.95

Calls 3

updateWebsocketMethod · 0.95
fileForgotMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected