From e48e14948f886a7bb71b22f82d71c2572a09341e Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Fri, 8 Jan 2016 22:14:53 +0100 Subject: CLI: fix the discovery of possible actions --- gitlab/cli.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gitlab/cli.py') diff --git a/gitlab/cli.py b/gitlab/cli.py index 1b8356c..53f32af 100644 --- a/gitlab/cli.py +++ b/gitlab/cli.py @@ -66,8 +66,7 @@ def clsToWhat(cls): def populate_sub_parser_by_class(cls, sub_parser): for action_name in ACTIONS: attr = 'can' + action_name.capitalize() - y = getattr(cls, attr) or getattr(gitlab.GitlabObject, attr) - if not y: + if not getattr(cls, attr): continue sub_parser_action = sub_parser.add_parser(action_name) [sub_parser_action.add_argument("--%s" % x.replace('_', '-'), -- cgit v1.2.1