diff options
author | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-09-26 20:41:41 +0200 |
---|---|---|
committer | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-09-27 12:37:16 +0200 |
commit | f495e94028bfddc264727ffc464cd694ddd05ab8 (patch) | |
tree | 8c0bf309b08576f96c9344d9937344e1447d2237 /git/index/util.py | |
parent | 29eb301700c41f0af7d57d923ad069cbdf636381 (diff) | |
download | gitpython-f495e94028bfddc264727ffc464cd694ddd05ab8.tar.gz |
src, #519: collect all is_<platform>() calls
Diffstat (limited to 'git/index/util.py')
-rw-r--r-- | git/index/util.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/git/index/util.py b/git/index/util.py index 171bd8fc..0340500c 100644 --- a/git/index/util.py +++ b/git/index/util.py @@ -2,6 +2,7 @@ import struct import tempfile import os +from git.compat import is_win __all__ = ('TemporaryFileSwap', 'post_clear_cache', 'default_index', 'git_working_dir') @@ -29,7 +30,7 @@ class TemporaryFileSwap(object): def __del__(self): if os.path.isfile(self.tmp_file_path): - if os.name == 'nt' and os.path.exists(self.file_path): + if is_win and os.path.exists(self.file_path): os.remove(self.file_path) os.rename(self.tmp_file_path, self.file_path) # END temp file exists |