1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Misc pep8 fixes

This commit is contained in:
Michael DeHaan 2013-10-19 13:02:57 -04:00
parent c933a4c59a
commit 21d4400c96
5 changed files with 7 additions and 4 deletions

View file

@ -377,7 +377,8 @@ def main():
create_vm_template(c, vmname, image, zone) create_vm_template(c, vmname, image, zone)
module.exit_json(changed=True, msg="deployed VM %s from template %s" % (vmname,image)) module.exit_json(changed=True, msg="deployed VM %s from template %s" % (vmname,image))
elif resource_type == 'new': 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) module.exit_json(changed=True, msg="deployed VM %s from scratch" % vmname)
else: else:
module.exit_json(changed=False, msg="You did not specify a resource type") module.exit_json(changed=False, msg="You did not specify a resource type")

View file

@ -880,7 +880,7 @@ class NetBsdService(Service):
if os.path.isfile(rcfile): if os.path.isfile(rcfile):
self.rcconf_file = 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() return self.service_enable_rcconf()

View file

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