summaryrefslogtreecommitdiffstats
path: root/contrib/inventory/vmware.py
diff options
context:
space:
mode:
authorMatt Martz <matt@sivel.net>2017-05-09 23:38:08 +0200
committerGitHub <noreply@github.com>2017-05-09 23:38:08 +0200
commitd3249e7875533d5d05351a19543d5fbc1c957cc9 (patch)
tree1774f344fed2799f15c606edf405b387e6d00909 /contrib/inventory/vmware.py
parent[cloud][inventory] Get tags for RDS instances. (#23989) (diff)
downloadansible-d3249e7875533d5d05351a19543d5fbc1c957cc9.tar.xz
ansible-d3249e7875533d5d05351a19543d5fbc1c957cc9.zip
pep8 fixes for contrib (#24344)
Diffstat (limited to 'contrib/inventory/vmware.py')
-rwxr-xr-xcontrib/inventory/vmware.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/inventory/vmware.py b/contrib/inventory/vmware.py
index 377c7cb83a..2419ddf814 100755
--- a/contrib/inventory/vmware.py
+++ b/contrib/inventory/vmware.py
@@ -47,9 +47,11 @@ try:
from logging import NullHandler
except ImportError:
from logging import Handler
+
class NullHandler(Handler):
def emit(self, record):
pass
+
logging.getLogger('psphere').addHandler(NullHandler())
logging.getLogger('suds').addHandler(NullHandler())
@@ -66,7 +68,7 @@ class VMwareInventory(object):
if os.environ.get('VMWARE_INI', ''):
config_files = [os.environ['VMWARE_INI']]
else:
- config_files = [os.path.abspath(sys.argv[0]).rstrip('.py') + '.ini', 'vmware.ini']
+ config_files = [os.path.abspath(sys.argv[0]).rstrip('.py') + '.ini', 'vmware.ini']
for config_file in config_files:
if os.path.exists(config_file):
self.config.read(config_file)
@@ -362,7 +364,7 @@ class VMwareInventory(object):
# Loop through all VMs on physical host.
for vm in host.vm:
if prefix_filter:
- if vm.name.startswith( prefix_filter ):
+ if vm.name.startswith(prefix_filter):
continue
self._add_host(inv, 'all', vm.name)
self._add_host(inv, vm_group, vm.name)