Added comments for two branches in the instance detection

This commit is contained in:
Armin Ronacher 2011-08-10 17:51:49 +02:00
parent e328eba97c
commit 74f4af59f6

View file

@ -575,8 +575,10 @@ class Flask(_PackageBoundObject):
base_dir = py_prefix
elif site_folder == 'site-packages':
parent, folder = os.path.split(site_parent)
# Windows like installations
if folder.lower() == 'lib':
base_dir = parent
# UNIX like installations
elif os.path.basename(parent).lower() == 'lib':
base_dir = os.path.dirname(parent)
else: