From 2083b966b9cf60b10e3dd1dc9f5523a2edc840c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1ll=20Gu=C3=B0j=C3=B3n=20Sigur=C3=B0sson?= Date: Thu, 2 Sep 2010 23:44:48 +0000 Subject: [PATCH] --- check_hparray/trunk/check_hpacucli.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/check_hparray/trunk/check_hpacucli.py b/check_hparray/trunk/check_hpacucli.py index a895a4a..b2171ea 100644 --- a/check_hparray/trunk/check_hpacucli.py +++ b/check_hparray/trunk/check_hpacucli.py @@ -117,14 +117,13 @@ def add_summary(text): def set_path(path): current_path = getenv('PATH') - if path == '': - if current_path.find('C:\\') > -1: # We are on this platform - path = ";C:\Program Files\Hewlett-Packard\Sanworks\Element Manager for StorageWorks HSV" - path = path + ";C:\Program Files (x86)\Compaq\Hpacucli\Bin\hpacucli.exe" - path = path + ";C:\Program Files\Compaq\Hpacucli\Bin\hpacucli.exe" - print "Tons of path added" - else: - path = ":/usr/local/bin" + if current_path.find('C:\\') > -1: # We are on this platform + path = ";C:\Program Files\Hewlett-Packard\Sanworks\Element Manager for StorageWorks HSV" + path = path + ";C:\Program Files (x86)\Compaq\Hpacucli\Bin\hpacucli.exe" + path = path + ";C:\Program Files\Compaq\Hpacucli\Bin\hpacucli.exe" + print "Tons of path added" + else: + path = ":/usr/local/bin" current_path = "%s%s" % (current_path,path) putenv('PATH', current_path)