From 0bf4af1175c0c559204c49dd0bdbc735926e7a12 Mon Sep 17 00:00:00 2001 From: Dhilan007 Date: Wed, 16 Jul 2014 15:36:50 +0800 Subject: [PATCH] fixed crash in setup.py script. --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 49f67ba7ff..08ca197bdb 100755 --- a/setup.py +++ b/setup.py @@ -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