From: W. Trevor King Date: Thu, 16 Feb 2012 12:50:22 +0000 (-0500) Subject: Raise errors in Project if the configured backend could not be loaded. X-Git-Tag: v0.3~14 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d38bea6752afd804715167164296737d565a7d20;p=update-copyright.git Raise errors in Project if the configured backend could not be loaded. --- diff --git a/update_copyright/project.py b/update_copyright/project.py index e9de6cc..18280b1 100644 --- a/update_copyright/project.py +++ b/update_copyright/project.py @@ -103,8 +103,12 @@ class Project (object): if vcs == 'Git': self._vcs = _GitBackend() elif vcs == 'Bazaar': + if _BazaarBackend is None: + raise _bazaar_import_error self._vcs = _BazaarBackend() elif vcs == 'Mercurial': + if _MercurialBackend is None: + raise _mercurial_import_error self._vcs = _MercurialBackend() else: raise NotImplementedError('vcs: {}'.format(vcs))