fixed crash in setup.py script.

This commit is contained in:
Dhilan007 2014-07-16 15:36:50 +08:00
parent 7e76b7b9a1
commit 0bf4af1175
1 changed files with 5 additions and 1 deletions

View File

@ -98,7 +98,11 @@ class SetEnvVar(object):
return sys.platform == 'darwin' return sys.platform == 'darwin'
def _is_zsh(self): 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): def _get_unix_file_list(self):
file_list = None file_list = None