[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

@ -10,7 +10,11 @@ Requires:
import os
import string
import pygit2
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)