Misc pep8 fixes

This commit is contained in:
Michael DeHaan 2013-10-19 13:02:57 -04:00
parent 91c34af12a
commit ce8b0944a9
4 changed files with 6 additions and 3 deletions

View file

@ -377,7 +377,8 @@ def main():
create_vm_template(c, vmname, image, zone)
module.exit_json(changed=True, msg="deployed VM %s from template %s" % (vmname,image))
elif resource_type == 'new':
create_vm(c, vmtype, vmname, zone, vmdisk_size, vmcpus, vmnic, vmnetwork, vmmem, vmdisk_alloc, sdomain, vmcores, vmos, vmdisk_int )
# FIXME: refactor, use keyword args.
create_vm(c, vmtype, vmname, zone, vmdisk_size, vmcpus, vmnic, vmnetwork, vmmem, vmdisk_alloc, sdomain, vmcores, vmos, vmdisk_int)
module.exit_json(changed=True, msg="deployed VM %s from scratch" % vmname)
else:
module.exit_json(changed=False, msg="You did not specify a resource type")

View file

@ -135,7 +135,7 @@ def generate_options_string(install_options):
if install_options is None:
return ''
options_str = ''
options_str = ''
for option in install_options:
options_str += ' --%s' % option

View file

@ -880,7 +880,7 @@ class NetBsdService(Service):
if os.path.isfile(rcfile):
self.rcconf_file = rcfile
self.rcconf_key = "%s" % string.replace(self.name,"-","_");
self.rcconf_key = "%s" % string.replace(self.name,"-","_")
return self.service_enable_rcconf()

View file

@ -168,6 +168,7 @@ def daemonize_self(module, password, port, minutes):
log("daemonizing successful")
class ThreadWithReturnValue(Thread):
def __init__(self, group=None, target=None, name=None, args=(), kwargs={}, Verbose=None):
Thread.__init__(self, group, target, name, args, kwargs, Verbose)
self._return = None
@ -176,6 +177,7 @@ class ThreadWithReturnValue(Thread):
if self._Thread__target is not None:
self._return = self._Thread__target(*self._Thread__args,
**self._Thread__kwargs)
def join(self,timeout=None):
Thread.join(self, timeout=timeout)
return self._return