Skip to content

Commit

Permalink
Fixes b-ryan#408
Browse files Browse the repository at this point in the history
  • Loading branch information
strnk committed Aug 28, 2019
1 parent a9b8c9b commit 9d51e7c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion powerline_shell/segments/svn.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ def _get_svn_revision():
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
env=get_subprocess_env())

revision = None
for line in p.communicate()[0].decode("utf-8").splitlines():
if "revision" in line:
revision = line.split("=")[1].split('"')[1]
Expand Down Expand Up @@ -66,5 +68,7 @@ def add_to_powerline(self):
symbol = " " + RepoStats().symbols["svn"]
else:
symbol = ""
self.powerline.append(symbol + " rev " + self.revision + " ", fg, bg)

if self.revision:
self.powerline.append(symbol + " rev " + self.revision + " ", fg, bg)
self.stats.add_to_powerline(self.powerline)

0 comments on commit 9d51e7c

Please sign in to comment.