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

Commit 8b0d26c

Browse files
committed
Added Bot Management ability and fixed an edge case for the API return
1 parent 4c80399 commit 8b0d26c

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CloudFlare/api_v4.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def zones(self):
8383
self.add('AUTH', "zones", "activation_check")
8484
self.add('AUTH', "zones", "available_plans")
8585
self.add('AUTH', "zones", "available_rate_plans")
86+
self.add('AUTH', "zones", "bot_management")
8687
self.add('AUTH', "zones", "custom_certificates")
8788
self.add('AUTH', "zones", "custom_certificates/prioritize")
8889
self.add('AUTH', "zones", "custom_hostnames")

CloudFlare/cloudflare.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ def _call(self, method, headers, parts,
470470
response_data['success'] = True
471471

472472
if response_data['success'] is False:
473-
if 'errors' in response_data:
473+
if 'errors' in response_data and response_data['errors'] != None:
474474
errors = response_data['errors'][0]
475475
else:
476476
errors = {}

0 commit comments

Comments
 (0)