Skip to content
Snippets Groups Projects

Add compatibility for Python 3.6: follow-up

Merged Henri Menke requested to merge hmenke/mpsd-software-manager:python3.6 into main
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -129,9 +129,9 @@ def clone_repo(
["git", "branch", "-a"], check=True, capture_output=True
)
branches_list = branches_result.stdout.decode().split("\n")
# strip off 'remotes/origin' (needs Python 3.9):
removeprefix = lambda s, p: s[len(p) :] if s.startswith(p) else s # noqa
branches_list = [
b.strip().removeprefix("remotes/origin/") for b in branches_list
removeprefix(b.strip(), "remotes/origin/") for b in branches_list
]
msg += f"Available branches are {branches_list}"
logging.error(msg)
Loading