From e6aabe56050d56778f66f7e147f823e27e9d1640 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Sun, 20 Jan 2019 18:45:47 +0100 Subject: [PATCH] [CI] More package crazyness --- .travis.yml | 1 + bumblebee/modules/git.py | 6 ++++-- themes/icons/awesome-fonts.json | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c7b712c..72c8a8e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,7 @@ install: - pip install -U coverage==4.3 - pip install codeclimate-test-reporter - pip install taskw + - pip install pygit2 script: - nosetests -v --with-coverage --cover-erase tests/ - CODECLIMATE_REPO_TOKEN=40cb00907f7a10e04868e856570bb997ab9c42fd3b63d980f2b2269433195fdf codeclimate-test-reporter diff --git a/bumblebee/modules/git.py b/bumblebee/modules/git.py index 6070cd0..41fc275 100644 --- a/bumblebee/modules/git.py +++ b/bumblebee/modules/git.py @@ -24,9 +24,10 @@ class Module(bumblebee.engine.Module): ) self._engine = engine self._fmt = self.parameter("format", "{branch} {flags}") + self._error = False def hidden(self): - return False # TODO + return self._error def gitinfo(self, widget): info = "" @@ -55,8 +56,9 @@ class Module(bumblebee.engine.Module): data["branch"] = repo.head.shorthand data["directory"] = directory data["flags"] = " ".join([self._engine._theme.symbol(widget, name, name[0]) for name in data["flags"].keys()]) - + self._error = False except Exception as e: + self._error = True return e return string.Formatter().vformat(self._fmt, (), data) diff --git a/themes/icons/awesome-fonts.json b/themes/icons/awesome-fonts.json index 1078f8f..01359da 100644 --- a/themes/icons/awesome-fonts.json +++ b/themes/icons/awesome-fonts.json @@ -186,6 +186,7 @@ } }, "git": { + "prefix": "", "new": "", "modified": "", "deleted": ""