2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-28 11:57:34 +00:00

Merge "Check for IPMIPASSWORD env var in pyghmiutil"

This commit is contained in:
Jenkins 2015-01-05 21:32:06 +00:00 committed by Gerrit Code Review
commit d33d03f0cf

View File

@ -25,12 +25,14 @@ import string
import sys
from pyghmi.ipmi import command
password = os.environ['IPMIPASSWORD']
os.environ['IPMIPASSWORD'] = ""
if (len(sys.argv) < 3):
if (len(sys.argv) < 3) or 'IPMIPASSWORD' not in os.environ:
print "Usage:"
print " IPMIPASSWORD=password %s bmc username <cmd> <optarg>" % sys.argv[0]
sys.exit(1)
password = os.environ['IPMIPASSWORD']
os.environ['IPMIPASSWORD'] = ""
bmc = sys.argv[1]
userid = sys.argv[2]
args = None