commit a3fd0061fffcc7501c2b48bb89f4f8293e343f93
Author: Radek Novacek <rnovacek(a)redhat.com>
Date: Wed Jan 11 17:42:40 2012 +0100
Make the password for ESX not mandatory
virt-who.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/virt-who.py b/virt-who.py
index 21ad083..f2aaf0b 100644
--- a/virt-who.py
+++ b/virt-who.py
@@ -262,7 +262,8 @@ if __name__ == '__main__':
options.esx_env = checkEnv("VIRTWHO_ESX_ENV", options.esx_env,
"env")
options.esx_server = checkEnv("VIRTWHO_ESX_SERVER", options.esx_server,
"server")
options.esx_username = checkEnv("VIRTWHO_ESX_USERNAME",
options.esx_username, "username")
- options.esx_password = checkEnv("VIRTWHO_ESX_PASSWORD",
options.esx_password, "password")
+ if len(options.esx_password) == 0:
+ options.esx_password = os.getenv("VIRTWHO_ESX_PASSWORD",
"")
if options.interval < 0:
logger.warning("Interval is not positive number, ignoring")
Show replies by date