X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/d9c82a4e0d2c2b3dec1b44e97978274171e9ffb4..415feb2ee0a760e48a21a50488f6072f8afa9cff:/lib/server/rapi.py diff --git a/lib/server/rapi.py b/lib/server/rapi.py index 5e8cfa1..f6fe285 100644 --- a/lib/server/rapi.py +++ b/lib/server/rapi.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +# # # Copyright (C) 2006, 2007, 2008, 2009, 2010 Google Inc. @@ -22,7 +22,7 @@ """ -# pylint: disable-msg=C0103,W0142 +# pylint: disable=C0103,W0142 # C0103: Invalid name ganeti-watcher @@ -34,7 +34,7 @@ import os.path import errno try: - from pyinotify import pyinotify # pylint: disable-msg=E0611 + from pyinotify import pyinotify # pylint: disable=E0611 except ImportError: import pyinotify @@ -49,7 +49,7 @@ from ganeti import compat from ganeti import utils from ganeti.rapi import connector -import ganeti.http.auth # pylint: disable-msg=W0611 +import ganeti.http.auth # pylint: disable=W0611 import ganeti.http.server @@ -79,7 +79,7 @@ class JsonErrorRequestExecutor(http.server.HttpServerRequestExecutor): @return: the body of the message """ - return serializer.DumpJson(values, indent=True) + return serializer.DumpJson(values) class RemoteApiHttpServer(http.auth.HttpServerRequestAuthentication, @@ -90,7 +90,7 @@ class RemoteApiHttpServer(http.auth.HttpServerRequestAuthentication, AUTH_REALM = "Ganeti Remote API" def __init__(self, *args, **kwargs): - # pylint: disable-msg=W0233 + # pylint: disable=W0233 # it seems pylint doesn't see the second parent class there http.server.HttpServer.__init__(self, *args, **kwargs) http.auth.HttpServerRequestAuthentication.__init__(self) @@ -118,7 +118,7 @@ class RemoteApiHttpServer(http.auth.HttpServerRequestAuthentication, users = http.auth.ParsePasswordFile(contents) - except Exception, err: # pylint: disable-msg=W0703 + except Exception, err: # pylint: disable=W0703 # We don't care about the type of exception logging.error("Error while parsing %s: %s", filename, err) return False @@ -321,14 +321,14 @@ def PrepRapi(options, _): server.LoadUsers(constants.RAPI_USERS_FILE) - # pylint: disable-msg=E1101 + # pylint: disable=E1101 # it seems pylint doesn't see the second parent class there server.Start() return (mainloop, server) -def ExecRapi(options, args, prep_data): # pylint: disable-msg=W0613 +def ExecRapi(options, args, prep_data): # pylint: disable=W0613 """Main remote API function, executed with the PID file held. """