mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-06 08:24:02 -07:00
Fix errors reported by pylint. (#23282)
* Fix pylint misplaced-bare-raise errors. * Fix pylint return-in-init error. * Fix pylint bad-format-character error. * Fix pylint too-many-format-args errors. * Fix pylint too-few-format-args errors. * Fix pylint truncated-format-string error.
This commit is contained in:
parent
9e1bf1c6f2
commit
48eeab8a53
15 changed files with 17 additions and 25 deletions
|
@ -688,8 +688,7 @@ class AzureRMVirtualMachine(AzureRMModuleBase):
|
|||
except CloudError:
|
||||
self.log('Virtual machine {0} does not exist'.format(self.name))
|
||||
if self.state == 'present':
|
||||
self.log("CHANGED: virtual machine does not exist but state is present." \
|
||||
.format(self.name))
|
||||
self.log("CHANGED: virtual machine {0} does not exist but state is 'present'.".format(self.name))
|
||||
changed = True
|
||||
|
||||
self.results['changed'] = changed
|
||||
|
@ -887,7 +886,7 @@ class AzureRMVirtualMachine(AzureRMModuleBase):
|
|||
vm = self.compute_client.virtual_machines.get(self.resource_group, self.name, expand='instanceview')
|
||||
return vm
|
||||
except Exception as exc:
|
||||
self.fail("Error getting virtual machine (0) - {1}".format(self.name, str(exc)))
|
||||
self.fail("Error getting virtual machine {0} - {1}".format(self.name, str(exc)))
|
||||
|
||||
def serialize_vm(self, vm):
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue