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:
Matt Clay 2017-04-06 16:58:16 -07:00 committed by GitHub
commit 48eeab8a53
15 changed files with 17 additions and 25 deletions

View file

@ -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):
'''