Assorted pylint fixes

This commit is contained in:
Dag Wieers 2019-02-14 21:02:27 +01:00 committed by Matt Clay
parent 8e0f95951d
commit f9ab9b4d68
65 changed files with 343 additions and 473 deletions

View file

@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Hiroaki Nakamura <hnakamur@gmail.com>
# Copyright: (c) 2016, Hiroaki Nakamura <hnakamur@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
@ -263,7 +263,7 @@ class LXDProfileManagement(object):
def _rename_profile(self):
config = {'name': self.new_name}
self.client.do('POST', '/1.0/profiles/{}'.format(self.name), config)
self.client.do('POST', '/1.0/profiles/{0}'.format(self.name), config)
self.actions.append('rename')
self.name = self.new_name
@ -284,11 +284,11 @@ class LXDProfileManagement(object):
config = self.old_profile_json.copy()
for k, v in self.config.items():
config[k] = v
self.client.do('PUT', '/1.0/profiles/{}'.format(self.name), config)
self.client.do('PUT', '/1.0/profiles/{0}'.format(self.name), config)
self.actions.append('apply_profile_configs')
def _delete_profile(self):
self.client.do('DELETE', '/1.0/profiles/{}'.format(self.name))
self.client.do('DELETE', '/1.0/profiles/{0}'.format(self.name))
self.actions.append('delete')
def run(self):
@ -354,11 +354,11 @@ def main():
),
key_file=dict(
type='str',
default='{}/.config/lxc/client.key'.format(os.environ['HOME'])
default='{0}/.config/lxc/client.key'.format(os.environ['HOME'])
),
cert_file=dict(
type='str',
default='{}/.config/lxc/client.crt'.format(os.environ['HOME'])
default='{0}/.config/lxc/client.crt'.format(os.environ['HOME'])
),
trust_password=dict(type='str', no_log=True)
),