[CI] More package crazyness

This commit is contained in:
Tobias Witek 2019-01-20 18:45:47 +01:00
parent a2fda968c8
commit e6aabe5605
3 changed files with 6 additions and 2 deletions

View file

@ -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

View file

@ -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)

View file

@ -186,6 +186,7 @@
}
},
"git": {
"prefix": "",
"new": "",
"modified": "",
"deleted": ""