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

Commit 977aa24

Browse files
committed
pesky python keyword handling
1 parent 13c1681 commit 977aa24

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

CloudFlare/cloudflare.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -884,13 +884,15 @@ def api_list(self, m=None, s=''):
884884
# w.append(str(a)[1:-1] + ' ; UNUSED')
885885
pass
886886
if '_parts' in d:
887-
if n[-1] == '_' and keyword.iskeyword(n[:-1]):
887+
if n[-1] == '_':
888+
if keyword.iskeyword(n[:-1]):
889+
# should always be a keyword - but now nothing needs to be done
890+
pass
888891
# remove the extra keyword postfix'ed with underscore
889-
pass
892+
w.append(str(a)[1:-1])
890893
else:
891894
# handle underscores by returning the actual API call vs the method name
892895
w.append(str(a)[1:-1])
893-
## w.append(str(a)[1:-1].replace('/:id/','/'))
894896
# now recurse downwards into the tree
895897
w = w + self.api_list(a, s + '/' + n)
896898
return w

0 commit comments

Comments
 (0)