Merge pull request #7465 from Dhilan007/v3-320final

fixed crash in setup.py script.
This commit is contained in:
minggo 2014-07-16 20:56:51 +08:00
commit c5d30ce40c
1 changed files with 5 additions and 1 deletions

View File

@ -98,7 +98,11 @@ class SetEnvVar(object):
return sys.platform == 'darwin'
def _is_zsh(self):
return os.environ.get('SHELL')[-3:] == "zsh"
shellItem = os.environ.get('SHELL')
if shellItem is not None:
if len(shellItem) >= 3:
return shellItem[-3:] == "zsh"
return False
def _get_unix_file_list(self):
file_list = None