Misc pep8 fixes

reviewable/pr18780/r1
Michael DeHaan 11 years ago
parent 91c34af12a
commit ce8b0944a9

@ -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")

@ -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

@ -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()

@ -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

Loading…
Cancel
Save