[modules/git] Make CI (hopefully) run through

OK, so I cannot configure Travis to install pygit2, obviously. Instead,
I'll make the "git" module run though even if pygit2 is not installed.

Hope that satisfies you, Travis!
This commit is contained in:
Tobias Witek 2019-01-20 19:27:04 +01:00
parent a48f4c41c8
commit 1698e4ad4c
2 changed files with 8 additions and 5 deletions

View file

@ -1,6 +1,5 @@
sudo: false
language: python
dist: xenial
python:
- "2.7"
- "3.3"
@ -9,7 +8,7 @@ python:
- "3.6"
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y task libgit2 libgit2-dev
- sudo apt-get install -y task
install:
- pip install i3ipc
- pip install psutil
@ -17,7 +16,6 @@ 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

@ -10,7 +10,11 @@ Requires:
import os
import string
import logging
try:
import pygit2
except ImportError:
pass
import bumblebee.input
import bumblebee.output
@ -59,7 +63,8 @@ class Module(bumblebee.engine.Module):
self._error = False
except Exception as e:
self._error = True
return e
logging.error(e)
return "n/a"
return string.Formatter().vformat(self._fmt, (), data)