From 1de8af907dbced4fde64ee2c7f57527fc43ad1cc Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 4 Jan 2015 16:07:02 +0100 Subject: Removed unnecessary (non-gitpython) tests and fixed flake8 --- git/util.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'git/util.py') 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 -- cgit v1.2.1