diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-04 16:07:02 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-04 16:07:02 +0100 |
commit | 1de8af907dbced4fde64ee2c7f57527fc43ad1cc (patch) | |
tree | ed6622f4694d8e17633b3de6942b778dc2911bfd /git/util.py | |
parent | 6f55c17f48d7608072199496fbcefa33f2e97bf0 (diff) | |
download | gitpython-1de8af907dbced4fde64ee2c7f57527fc43ad1cc.tar.gz |
Removed unnecessary (non-gitpython) tests and fixed flake80.3.3
Diffstat (limited to 'git/util.py')
-rw-r--r-- | git/util.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/git/util.py b/git/util.py index c29ed70b..fecd9fa2 100644 --- a/git/util.py +++ b/git/util.py @@ -19,7 +19,7 @@ from exc import GitCommandError # Most of these are unused here, but are for use by git-python modules so these # don't see gitdb all the time. Flake of course doesn't like it. -from gitdb.util import ( +from gitdb.util import ( # NOQA make_sha, LockedFD, file_contents_ro, @@ -84,14 +84,13 @@ def join_path(a, *p): return path -def to_native_path_windows(path): - return path.replace('/', '\\') - +if sys.platform.startswith('win'): + def to_native_path_windows(path): + return path.replace('/', '\\') -def to_native_path_linux(path): - return path.replace('\\', '/') + def to_native_path_linux(path): + return path.replace('\\', '/') -if sys.platform.startswith('win'): to_native_path = to_native_path_windows else: # no need for any work on linux |