[sysadmin-bin] Use lstrip to remove leading whitespace or asterisk
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Use lstrip to remove leading whitespace or asterisk
- Date: Tue, 15 Oct 2019 13:02:18 +0000 (UTC)
commit c1a26b4b98fd6901ada388d800ac7dcffbc102bb
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date: Tue Oct 15 15:02:25 2019 +0200
Use lstrip to remove leading whitespace or asterisk
git/git.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/git/git.py b/git/git.py
index c3ca2a9..8e42d1a 100644
--- a/git/git.py
+++ b/git/git.py
@@ -231,5 +231,5 @@ def get_project_head_name():
def get_project_branches():
lines = git.branch(list=True, _split_lines=True)
- branches = [line[2:] for line in lines]
+ branches = [line.lstrip("*").lstrip() for line in lines]
return branches
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]