diff options
Diffstat (limited to 'git/repo/base.py')
-rw-r--r-- | git/repo/base.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/git/repo/base.py b/git/repo/base.py index 0e46ee67..d0f131bd 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -56,6 +56,7 @@ from git.compat import ( PY3, safe_decode, range, + is_win, ) import os @@ -71,7 +72,7 @@ if sys.version_info[:2] < (2, 5): # python 2.4 compatiblity BlameEntry = namedtuple('BlameEntry', ['commit', 'linenos', 'orig_path', 'orig_linenos']) -__all__ = ('Repo', ) +__all__ = ('Repo',) def _expand_path(p): @@ -369,7 +370,7 @@ class Repo(object): def _get_config_path(self, config_level): # we do not support an absolute path of the gitconfig on windows , # use the global config instead - if sys.platform == "win32" and config_level == "system": + if is_win() and config_level == "system": config_level = "global" if config_level == "system": @@ -883,7 +884,7 @@ class Repo(object): prev_cwd = None prev_path = None odbt = kwargs.pop('odbt', odb_default_type) - if os.name == 'nt': + if is_win(): if '~' in path: raise OSError("Git cannot handle the ~ character in path %r correctly" % path) |