Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit 6655fee

Browse files
committed
walk the tree correctly for --dump option
1 parent 3e177cf commit 6655fee

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

cli4/cli4.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,11 @@ def walk(m, s):
122122
continue
123123
a = getattr(m, n)
124124
d = dir(a)
125-
if 'delete' in d or 'get' in d or 'patch' in d or 'post' in d or 'put' in d:
125+
if '_base' in d:
126126
# it's a known api call - lets print it and continue down the tree
127-
print s + '/' + n
127+
if 'delete' in d or 'get' in d or 'patch' in d or 'post' in d or 'put' in d:
128+
# only print if a call exists for this part
129+
print s + '/' + n
128130
walk(a, s + '/' + n)
129131

130132
def dump_commands(cf):

0 commit comments

Comments
 (0)