diff --git a/pubs/repo.py b/pubs/repo.py index 6aac55a..e3df89e 100644 --- a/pubs/repo.py +++ b/pubs/repo.py @@ -20,7 +20,7 @@ class CiteKeyError(Exception): self.message = message self.citekey = citekey - def __repr__(self): + def __str__(self): return self.message or self.default_msg.format(self.citekey) diff --git a/pubs/uis.py b/pubs/uis.py index 1392050..f61feb3 100644 --- a/pubs/uis.py +++ b/pubs/uis.py @@ -87,7 +87,7 @@ class PrintUI(object): if self.debug: raise exc else: - self.error(exc) + self.error(exc.__string__()) self.exit()