From 0c47956c2a171cb24cfbe03ec3130e2fd1cb0781 Mon Sep 17 00:00:00 2001 From: Veiko Aasa Date: Wed, 27 Mar 2024 18:52:06 +0200 Subject: [PATCH] gitweb: Fix an issue when cloning existing repository Skip all the other git clone progress log lines. Fixes occasional `'total_progress' not defined` error. Tested in the testing container that cloning exisiting repository works. Signed-off-by: Veiko Aasa Reviewed-by: Sunil Mohan Adapa --- plinth/modules/gitweb/privileged.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plinth/modules/gitweb/privileged.py b/plinth/modules/gitweb/privileged.py index 2248ec776..5d81d568f 100644 --- a/plinth/modules/gitweb/privileged.py +++ b/plinth/modules/gitweb/privileged.py @@ -145,6 +145,8 @@ def _clone_status_line_to_percent(line): total_progress = 10 + 0.6 * progress elif 'Resolving deltas' in text: total_progress = 70 + 0.3 * progress + else: + return None return str(int(total_progress))