diff options
-rw-r--r-- | src/lib/Component.py | 3 | ||||
-rw-r--r-- | src/lib/Server/Admin/Xcmd.py | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/Component.py b/src/lib/Component.py index 619fab3c5..e061a12bc 100644 --- a/src/lib/Component.py +++ b/src/lib/Component.py @@ -198,6 +198,9 @@ class Component (object): else: try: method_func = self._resolve_exposed_method(method) + except NoExposedMethod: + self.logger.error("Unknown method %s" % (method)) + raise xmlrpclib.Fault(7, "Unknown method %s" % method) except Exception, e: if getattr(e, "log", True): self.logger.error(e, exc_info=True) diff --git a/src/lib/Server/Admin/Xcmd.py b/src/lib/Server/Admin/Xcmd.py index 7591c0c45..7d6195fa0 100644 --- a/src/lib/Server/Admin/Xcmd.py +++ b/src/lib/Server/Admin/Xcmd.py @@ -41,7 +41,7 @@ class Xcmd(Bcfg2.Server.Admin.Mode): try: data = apply(getattr(proxy, cmd), args) except xmlrpclib.Fault, flt: - if flt.faultCode == 1: + if flt.faultCode == 7: print("Unknown method %s" % cmd) return else: |