Fix error when accessing some pages of the admin interface
Signed-off-by: James Ren <jamesren@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@4153 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/frontend/afe/rpc_handler.py b/frontend/afe/rpc_handler.py
index 3cf400b..52c0adf 100644
--- a/frontend/afe/rpc_handler.py
+++ b/frontend/afe/rpc_handler.py
@@ -5,7 +5,7 @@
__author__ = 'showard@google.com (Steve Howard)'
-import traceback, pydoc, re, urllib, logging, logging.handlers
+import traceback, pydoc, re, urllib, logging, logging.handlers, inspect
from autotest_lib.frontend.afe.json_rpc import serviceHandler
from autotest_lib.frontend.afe import models, rpc_utils
from autotest_lib.client.common_lib import global_config
@@ -127,7 +127,7 @@
if name.startswith('_'):
continue
attribute = getattr(module, name)
- if not callable(attribute):
+ if not inspect.isfunction(attribute):
continue
decorated_function = RpcHandler._allow_keyword_args(attribute)
setattr(self._rpc_methods, name, decorated_function)