From 0210e394e0776d0b7097bf666bebd690ed0c0e4f Mon Sep 17 00:00:00 2001 From: Kostis Anagnostopoulos Date: Sat, 15 Oct 2016 13:11:16 +0200 Subject: src: import os.path as osp --- git/index/util.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'git/index/util.py') diff --git a/git/index/util.py b/git/index/util.py index ce798851..3c59b1d8 100644 --- a/git/index/util.py +++ b/git/index/util.py @@ -1,12 +1,14 @@ """Module containing index utilities""" +from functools import wraps +import os import struct import tempfile -import os - -from functools import wraps from git.compat import is_win +import os.path as osp + + __all__ = ('TemporaryFileSwap', 'post_clear_cache', 'default_index', 'git_working_dir') #{ Aliases @@ -32,8 +34,8 @@ class TemporaryFileSwap(object): pass def __del__(self): - if os.path.isfile(self.tmp_file_path): - if is_win and os.path.exists(self.file_path): + if osp.isfile(self.tmp_file_path): + if is_win and osp.exists(self.file_path): os.remove(self.file_path) os.rename(self.tmp_file_path, self.file_path) # END temp file exists -- cgit v1.2.1