Anonymous committed 2545492

don't user USER_SITE on py < 2.6

Comments (0)

Files changed (1)

 This file can also be run as a script to install or upgrade setuptools.
-from site import USER_SITE
+    from site import USER_SITE
+except ImportError:
+    USER_SITE = None
 import sys
 import os
 import time
                 if len(args) > index:
                     top_dir = args[index+1]
                     return location.startswith(top_dir)
-            elif option == '--user':
+            elif option == '--user' and USER_SITE is not None:
                 return location.startswith(USER_SITE)
     return True