summaryrefslogtreecommitdiff
path: root/git/repo/base.py
diff options
context:
space:
mode:
authorKostis Anagnostopoulos <ankostis@gmail.com>2016-09-26 20:41:41 +0200
committerKostis Anagnostopoulos <ankostis@gmail.com>2016-09-27 12:37:16 +0200
commitf495e94028bfddc264727ffc464cd694ddd05ab8 (patch)
tree8c0bf309b08576f96c9344d9937344e1447d2237 /git/repo/base.py
parent29eb301700c41f0af7d57d923ad069cbdf636381 (diff)
downloadgitpython-f495e94028bfddc264727ffc464cd694ddd05ab8.tar.gz
src, #519: collect all is_<platform>() calls
Diffstat (limited to 'git/repo/base.py')
-rw-r--r--git/repo/base.py7
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)