Skip to content
Prev Previous commit
Use continue instead of raising error
  • Loading branch information
mickours committed Mar 18, 2021
commit d283c83c43f5e52a1a14e55b35ffe85a780615d8
4 changes: 2 additions & 2 deletions git/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,14 +356,14 @@ def remove_password_if_present(cmdline):
url = urlsplit(to_parse)
# Remove password from the URL if present
if url.password is None:
raise ValueError()
continue

edited_url = url._replace(
netloc=url.netloc.replace(url.password, "*****"))
new_cmdline[index] = urlunsplit(edited_url)
except ValueError:
# This is not a valid URL
pass
continue
return new_cmdline


Expand Down