Code Cleanup
This commit is contained in:
@@ -543,6 +543,7 @@ class SimpleTUI:
|
||||
Args:
|
||||
full_clear: Whether to clear the screen before refreshing.
|
||||
refresh_input: Whether to refresh the input area (default: False to avoid interrupting typing).
|
||||
|
||||
"""
|
||||
if not self.enabled:
|
||||
return
|
||||
@@ -1534,6 +1535,7 @@ def resource_callback(resource):
|
||||
|
||||
Returns:
|
||||
True if resource should be accepted, False otherwise.
|
||||
|
||||
"""
|
||||
sender_identity = resource.link.get_remote_identity()
|
||||
|
||||
@@ -1555,6 +1557,7 @@ def resource_started(resource):
|
||||
|
||||
Args:
|
||||
resource: RNS Resource object.
|
||||
|
||||
"""
|
||||
filepath = None
|
||||
if resource.metadata and "filepath" in resource.metadata:
|
||||
@@ -1569,6 +1572,7 @@ def resource_concluded(resource):
|
||||
|
||||
Args:
|
||||
resource: RNS Resource object.
|
||||
|
||||
"""
|
||||
if resource.status != RNS.Resource.COMPLETE:
|
||||
filepath = None
|
||||
@@ -1678,8 +1682,6 @@ def handle_file_chunk(data, link):
|
||||
link.download_buffers[filepath]["chunks"][chunk_num]["sub_chunks"][sub_chunk_idx] = chunk_data
|
||||
link.download_buffers[filepath]["chunks"][chunk_num]["total_sub_chunks"] = sub_chunk_total
|
||||
|
||||
received_sub_chunks = len(link.download_buffers[filepath]["chunks"][chunk_num]["sub_chunks"])
|
||||
|
||||
if mode == "delta":
|
||||
RNS.log(
|
||||
f"Received delta block {chunk_num} sub-chunk {sub_chunk_idx + 1}/{sub_chunk_total} for {filepath}",
|
||||
|
||||
Reference in New Issue
Block a user