From 2ab45cf4f0d7181ca3b393feb213288e16a8f77b Mon Sep 17 00:00:00 2001 From: Arnaud Rebillout Date: Tue, 16 Jul 2019 20:20:19 +0700 Subject: [PATCH] Make sure that variable num_files_total_local is declared This variable is declared in `if m:`. Of course if this codepath doesn't run, the variable is not declared an Python doesn't like this kind of surprise... Signed-off-by: Arnaud Rebillout --- src/modules/unpackfs/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index ac90a994e..e956dc070 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -103,6 +103,7 @@ def file_copy(source, dest, progress_cb): if not source.endswith("/"): source += "/" + num_files_total_local = 0 num_files_copied = 0 # Gets updated through rsync output args = ['rsync', '-aHAXr']