Skip to content

Commit 5ca2b6f

Browse files
committed
added support for dashes/underscores in commands and python calls - kinda overdue
1 parent 88db48c commit 5ca2b6f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

CloudFlare/cloudflare.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,9 @@ def add(self, t, p1, p2=None, p3=None):
883883
# should never happen
884884
raise CloudFlareAPIError(0, 'api load type mismatch')
885885

886+
if '-' in name:
887+
# dashes (vs underscores) cause issues in Python and other languages
888+
setattr(branch, name.replace('-','_'), f)
886889
setattr(branch, name, f)
887890

888891
def api_list(self, m=None, s=''):

0 commit comments

Comments
 (0)