Fixed pylint

This commit is contained in:
Alexandru Bleotu 2017-07-20 21:06:35 +01:00
parent 5a63ed7449
commit d5b6c6be25
3 changed files with 3 additions and 8 deletions

View file

@ -212,7 +212,7 @@ def get_proxy_type():
salt '*' vsphere.get_proxy_type
'''
if __pillar__.get('proxy',{}).get('proxytype'):
if __pillar__.get('proxy', {}).get('proxytype'):
return __pillar__['proxy']['proxytype']
if __opts__.get('proxy', {}).get('proxytype'):
return __opts__['proxy']['proxytype']

View file

@ -105,7 +105,7 @@ def datacenter_configured(name):
log.info(comments[-1])
pchanges.update({'new': {'name': dc_name}})
else:
log.debug ('Creating datacenter \'{0}\'. '.format(dc_name))
log.debug('Creating datacenter \'{0}\'. '.format(dc_name))
__salt__['vsphere.create_datacenter'](dc_name, si)
comments.append('Created datacenter \'{0}\'.'.format(dc_name))
log.info(comments[-1])

View file

@ -23,11 +23,6 @@ from tests.support.mock import (
)
#Globals
esxdatacenter.__salt__ = {}
esxdatacenter.__opts__ = {}
@skipIf(NO_MOCK, NO_MOCK_REASON)
class DatacenterConfiguredTestCase(TestCase, LoaderModuleMockMixin):
'''Tests for salt.modules.esxdatacenter.datacenter_configured'''
@ -56,7 +51,7 @@ class DatacenterConfiguredTestCase(TestCase, LoaderModuleMockMixin):
self.addCleanup(patcher.stop)
def tearDown(self):
for attrname in ('mock_si'):
for attrname in ('mock_si',):
try:
delattr(self, attrname)
except AttributeError: