Skip to content

Commit e48e149

Browse files
author
Gauvain Pocentek
committed
CLI: fix the discovery of possible actions
1 parent e8631c1 commit e48e149

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

gitlab/cli.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ def clsToWhat(cls):
6666
def populate_sub_parser_by_class(cls, sub_parser):
6767
for action_name in ACTIONS:
6868
attr = 'can' + action_name.capitalize()
69-
y = getattr(cls, attr) or getattr(gitlab.GitlabObject, attr)
70-
if not y:
69+
if not getattr(cls, attr):
7170
continue
7271
sub_parser_action = sub_parser.add_parser(action_name)
7372
[sub_parser_action.add_argument("--%s" % x.replace('_', '-'),

0 commit comments

Comments
 (0)