mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 21:17:54 +00:00
comment + logging cleanup
This commit is contained in:
parent
c445ac4c14
commit
6352db9c01
@ -212,8 +212,8 @@ class UnwantedFilesException(Exception):
|
|||||||
|
|
||||||
def await_file_contents(path, contents, timeout=15, error_if=None):
|
def await_file_contents(path, contents, timeout=15, error_if=None):
|
||||||
"""
|
"""
|
||||||
wait up to `timeout` seconds for the file at `path` to have the
|
wait up to `timeout` seconds for the file at `path` (any path-like
|
||||||
exact content `contents.
|
object) to have the exact content `contents`.
|
||||||
|
|
||||||
:param error_if: if specified, a list of additional paths; if any
|
:param error_if: if specified, a list of additional paths; if any
|
||||||
of these paths appear an Exception is raised.
|
of these paths appear an Exception is raised.
|
||||||
|
@ -456,7 +456,6 @@ class QueueMixin(HookMixin):
|
|||||||
seconds.
|
seconds.
|
||||||
"""
|
"""
|
||||||
while not self._stopped:
|
while not self._stopped:
|
||||||
# self._log("_do_processing iteration")
|
|
||||||
d = task.deferLater(self._clock, self._scan_delay(), lambda: None)
|
d = task.deferLater(self._clock, self._scan_delay(), lambda: None)
|
||||||
|
|
||||||
# adds items to our deque
|
# adds items to our deque
|
||||||
@ -1272,7 +1271,6 @@ class Downloader(QueueMixin, WriteFileMixin):
|
|||||||
file_node, metadata = max(scan_batch[relpath_u], key=lambda x: x[1]['version'])
|
file_node, metadata = max(scan_batch[relpath_u], key=lambda x: x[1]['version'])
|
||||||
|
|
||||||
if self._should_download(relpath_u, metadata['version'], file_node.get_readonly_uri()):
|
if self._should_download(relpath_u, metadata['version'], file_node.get_readonly_uri()):
|
||||||
self._log("_should_download(%r, %r, %r)" % (relpath_u, metadata['version'], file_node.get_readonly_uri()))
|
|
||||||
to_dl = DownloadItem(
|
to_dl = DownloadItem(
|
||||||
relpath_u,
|
relpath_u,
|
||||||
PercentProgress(file_node.get_size()),
|
PercentProgress(file_node.get_size()),
|
||||||
@ -1357,7 +1355,6 @@ class Downloader(QueueMixin, WriteFileMixin):
|
|||||||
return f
|
return f
|
||||||
|
|
||||||
if os.path.isfile(conflict_path_u):
|
if os.path.isfile(conflict_path_u):
|
||||||
self._log("already conflict: {}".format(conflict_path_u))
|
|
||||||
def fail(res):
|
def fail(res):
|
||||||
raise ConflictError("download failed: already conflicted: %r" % (item.relpath_u,))
|
raise ConflictError("download failed: already conflicted: %r" % (item.relpath_u,))
|
||||||
d.addCallback(fail)
|
d.addCallback(fail)
|
||||||
@ -1413,7 +1410,6 @@ class Downloader(QueueMixin, WriteFileMixin):
|
|||||||
elif dmd_last_downloaded_uri != db_entry.last_downloaded_uri:
|
elif dmd_last_downloaded_uri != db_entry.last_downloaded_uri:
|
||||||
is_conflict = True
|
is_conflict = True
|
||||||
self._log("conflict because dmd_last_downloaded_uri != db_entry.last_downloaded_uri")
|
self._log("conflict because dmd_last_downloaded_uri != db_entry.last_downloaded_uri")
|
||||||
self._log("{} != {}".format(dmd_last_downloaded_uri, db_entry.last_downloaded_uri))
|
|
||||||
|
|
||||||
else: # no local db_entry .. but has the file appeared locally meantime?
|
else: # no local db_entry .. but has the file appeared locally meantime?
|
||||||
if current_statinfo.exists:
|
if current_statinfo.exists:
|
||||||
|
Loading…
Reference in New Issue
Block a user