Skip to content

Commit

Permalink
added support for dashes/underscores in commands and python calls - k…
Browse files Browse the repository at this point in the history
…inda overdue
  • Loading branch information
mahtin committed Jul 18, 2020
1 parent 88db48c commit 5ca2b6f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CloudFlare/cloudflare.py
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,9 @@ def add(self, t, p1, p2=None, p3=None):
# should never happen
raise CloudFlareAPIError(0, 'api load type mismatch')

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

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

0 comments on commit 5ca2b6f

Please sign in to comment.