mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Couple lint fixes
This commit is contained in:
parent
49d0d1f1a5
commit
b1b164a227
@ -603,7 +603,7 @@ def enable(name, start=False, **kwargs):
|
||||
if not start:
|
||||
# create a temp 'down' file BEFORE enabling service.
|
||||
# will prevent sv from starting this service automatically.
|
||||
log.trace('need a temporary file %s', (down_file)
|
||||
log.trace('need a temporary file %s', down_file)
|
||||
if not os.path.exists(down_file):
|
||||
try:
|
||||
salt.utils.files.fopen(down_file, "w").close() # pylint: disable=resource-leakage
|
||||
|
@ -318,7 +318,7 @@ def delete_user(email, profile="splunk"):
|
||||
try:
|
||||
client.users.delete(user.name)
|
||||
except (AuthenticationError, HTTPError) as e:
|
||||
log.info('Exception: %s', (six.text_type(e))
|
||||
log.info('Exception: %s', six.text_type(e))
|
||||
return False
|
||||
else:
|
||||
return False
|
||||
|
@ -447,7 +447,7 @@ def update(endpoint='incidents',
|
||||
'''
|
||||
endpoint_sg = endpoint[:-1] # singular
|
||||
if not id:
|
||||
log.error('Invalid %s ID', endpoint_sg))
|
||||
log.error('Invalid %s ID', endpoint_sg)
|
||||
return {
|
||||
'result': False,
|
||||
'comment': 'Please specify a valid {endpoint} ID'.format(endpoint=endpoint_sg)
|
||||
|
@ -257,7 +257,7 @@ def _copy_function(module_name, name=None):
|
||||
log.exception('Module failed to instantiate')
|
||||
raise
|
||||
valid_methods = {}
|
||||
log.debug('Called methods are: %s', (methods)
|
||||
log.debug('Called methods are: %s', methods)
|
||||
for meth_name in methods:
|
||||
if not meth_name.startswith('_'):
|
||||
valid_methods[meth_name] = methods[meth_name]
|
||||
|
Loading…
Reference in New Issue
Block a user