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 <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Veiko Aasa 2024-03-27 18:52:06 +02:00 committed by Sunil Mohan Adapa
parent ee7c6373fc
commit 0c47956c2a
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -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))