aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2013-09-02 14:21:33 -0400
committerJason R. Coombs <jaraco@jaraco.com>2013-09-02 14:21:33 -0400
commit3860484b6cc33cc499b56c96a6332263be562bfe (patch)
tree86a011ca1909d8d229093268b7c177639a8de6ff /setuptools/command/easy_install.py
parent05ea2dae700821c491b3fd1cc665c26e1b7a5ed8 (diff)
downloadexternal_python_setuptools-3860484b6cc33cc499b56c96a6332263be562bfe.tar.gz
external_python_setuptools-3860484b6cc33cc499b56c96a6332263be562bfe.tar.bz2
external_python_setuptools-3860484b6cc33cc499b56c96a6332263be562bfe.zip
Refactor for nicer indentation
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-xsetuptools/command/easy_install.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 7aff9c84..755b15d6 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -81,14 +81,13 @@ def is_64bit():
return struct.calcsize("P") == 8
def samefile(p1, p2):
- if hasattr(os.path,'samefile') and (
- os.path.exists(p1) and os.path.exists(p2)
- ):
- return os.path.samefile(p1,p2)
- return (
- os.path.normpath(os.path.normcase(p1)) ==
- os.path.normpath(os.path.normcase(p2))
- )
+ both_exist = os.path.exists(p1) and os.path.exists(p2)
+ use_samefile = hasattr(os.path, 'samefile') and both_exist
+ if use_samefile:
+ return os.path.samefile(p1, p2)
+ norm_p1 = os.path.normpath(os.path.normcase(p1))
+ norm_p2 = os.path.normpath(os.path.normcase(p2))
+ return norm_p1 == norm_p2
if sys.version_info <= (3,):
def _to_ascii(s):