Skip to content

Commit

Permalink
repo better error reporting if git is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
tgbugs committed Jan 10, 2020
1 parent f621935 commit 7ccfd13
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions augpathlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

'AugmentedPath',
'XattrPath',
'RepoPath',
'XopenPath',
'LocalPath',

Expand All @@ -38,8 +39,15 @@

try:
from augpathlib.repo import RepoHelper, RepoPath
__all__ += 'RepoPath'
except ImportError:
pass
except ImportError as e:
class RepoHelper:
def __init__(self, *args, **kwargs):
raise ImportError(f'{self.__class__.__name__} could not be imported '
'due to a previous ImportError') from e


class RepoPath(RepoHelper):
pass


__version__ = '0.0.5'

0 comments on commit 7ccfd13

Please sign in to comment.