diff options
author | James Bowes <jbowes@redhat.com> | 2007-09-29 14:08:37 -0400 |
---|---|---|
committer | James Bowes <jbowes@redhat.com> | 2007-09-29 14:08:37 -0400 |
commit | e153b175bff255b9af212f6d969cb75503ab2f14 (patch) | |
tree | af340f21b7eefcbd59662680410c8c736caba3a3 /minion | |
parent | 99069f42f71f00cd0b44b59e6627657409569b6b (diff) | |
download | third_party-func-e153b175bff255b9af212f6d969cb75503ab2f14.tar.gz third_party-func-e153b175bff255b9af212f6d969cb75503ab2f14.tar.xz third_party-func-e153b175bff255b9af212f6d969cb75503ab2f14.zip |
Fix bad indentation in minion, modules and overlord
Diffstat (limited to 'minion')
-rwxr-xr-x | minion/codes.py | 4 | ||||
-rwxr-xr-x | minion/server.py | 22 | ||||
-rwxr-xr-x | minion/utils.py | 28 |
3 files changed, 26 insertions, 28 deletions
diff --git a/minion/codes.py b/minion/codes.py index c549709..058ca44 100755 --- a/minion/codes.py +++ b/minion/codes.py @@ -17,9 +17,9 @@ import exceptions class FuncException(exceptions.Exception): - pass + pass class InvalidMethodException(FuncException): - pass + pass # FIXME: more sub-exceptions maybe diff --git a/minion/server.py b/minion/server.py index 5671836..7a11ab8 100755 --- a/minion/server.py +++ b/minion/server.py @@ -140,13 +140,12 @@ class FuncApiMethod: def serve(): - """ - Code for starting the XMLRPC service. - FIXME: make this HTTPS (see RRS code) and make accompanying Rails changes.. - """ - server =FuncSSLXMLRPCServer(('', 51234)) - server.logRequests = 0 # don't print stuff to console - server.serve_forever() + """ + Code for starting the XMLRPC service. + """ + server =FuncSSLXMLRPCServer(('', 51234)) + server.logRequests = 0 # don't print stuff to console + server.serve_forever() @@ -154,12 +153,11 @@ class FuncXMLRPCServer(SimpleXMLRPCServer.SimpleXMLRPCServer, XmlRpcInterface): def __init__(self, args): - self.allow_reuse_address = True - - self.modules = module_loader.load_modules() - SimpleXMLRPCServer.SimpleXMLRPCServer.__init__(self, args) - XmlRpcInterface.__init__(self) + self.allow_reuse_address = True + self.modules = module_loader.load_modules() + SimpleXMLRPCServer.SimpleXMLRPCServer.__init__(self, args) + XmlRpcInterface.__init__(self) class FuncSSLXMLRPCServer(AuthedXMLRPCServer.AuthedSSLXMLRPCServer, diff --git a/minion/utils.py b/minion/utils.py index b0b8b0d..7a6180d 100755 --- a/minion/utils.py +++ b/minion/utils.py @@ -67,13 +67,13 @@ def create_minion_keys(): if result: - cert_fo = open(cert_file, 'w') - cert_fo.write(cert_string) - cert_fo.close() - - ca_cert_fo = open(ca_cert_file, 'w') - ca_cert_fo.write(ca_cert_string) - ca_cert_fo.close() + cert_fo = open(cert_file, 'w') + cert_fo.write(cert_string) + cert_fo.close() + + ca_cert_fo = open(ca_cert_file, 'w') + ca_cert_fo.write(ca_cert_string) + ca_cert_fo.close() def submit_csr_to_master(csr_file, master_uri): """" @@ -93,9 +93,9 @@ def submit_csr_to_master(csr_file, master_uri): # but we really need to fix out server side logging and error # reporting so we don't need it def trace_me(): - x = traceback.extract_stack() - bar = string.join(traceback.format_list(x)) - return bar + x = traceback.extract_stack() + bar = string.join(traceback.format_list(x)) + return bar def daemonize(pidfile=None): @@ -107,13 +107,13 @@ def daemonize(pidfile=None): print pidfile pid = os.fork() if pid > 0: - sys.exit(0) + sys.exit(0) os.setsid() os.umask(0) pid = os.fork() if pid > 0: - if pidfile is not None: - open(pidfile, "w").write(str(pid)) - sys.exit(0) + if pidfile is not None: + open(pidfile, "w").write(str(pid)) + sys.exit(0) |