Skip to content

Commit bbd1cdd

Browse files
committed
Add comments
1 parent f9d87e9 commit bbd1cdd

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

rclone_python/utils.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,17 @@ def rclone_progress(
112112

113113

114114
def extract_rclone_progress(line: str) -> Tuple[bool, Union[Dict[str, Any], None]]:
115+
"""Extracts and returns the progress updates from the rclone transfer operation.
116+
The returned Dictionary includes the original rclone stats output inside of "rclone_output".
117+
All file sizes and speeds are give in bytes.
118+
119+
Args:
120+
line (str): One output line of the rclone transfer operation with the --use-json-log flag enabled.
121+
122+
Returns:
123+
Tuple[bool, Union[Dict[str, Any], None]]: The retrieved update Dictionary.
124+
"""
125+
115126
try:
116127
stats: Dict = json.loads(line).get("stats", None)
117128
except ValueError:

0 commit comments

Comments
 (0)