summaryrefslogtreecommitdiffstats
path: root/ipaclient/frontend.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-06-30 15:45:54 +0200
committerJan Cholasta <jcholast@redhat.com>2016-07-01 09:40:04 +0200
commitcf713ac28362c40e6414e9bf9701e58e36c07deb (patch)
tree57ca75061aaea9d275dcfdf1f1b081690e247106 /ipaclient/frontend.py
parente5635f7ef423c7b203004a0cbf625360d351a78e (diff)
downloadfreeipa-cf713ac28362c40e6414e9bf9701e58e36c07deb.tar.gz
freeipa-cf713ac28362c40e6414e9bf9701e58e36c07deb.tar.xz
freeipa-cf713ac28362c40e6414e9bf9701e58e36c07deb.zip
client: do not crash when overriding remote command as method
Do not crash during API initialization when overriding remote command that is not a method with MethodOverride. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipaclient/frontend.py')
-rw-r--r--ipaclient/frontend.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/ipaclient/frontend.py b/ipaclient/frontend.py
index a869e337a..94d694631 100644
--- a/ipaclient/frontend.py
+++ b/ipaclient/frontend.py
@@ -55,11 +55,17 @@ class CommandOverride(Command):
class MethodOverride(CommandOverride, Method):
@property
def obj_name(self):
- return self.next.obj_name
+ try:
+ return self.next.obj_name
+ except AttributeError:
+ return None
@property
def attr_name(self):
- return self.next.attr_name
+ try:
+ return self.next.attr_name
+ except AttributeError:
+ return None
@property
def obj(self):