Skip to content

Commit 2008a53

Browse files
committed
flushed out tabs, converted print to print() - all python3 stuff
1 parent e179521 commit 2008a53

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

CloudFlare/cloudflare.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -235,27 +235,27 @@ def __init__(self, base, api_call_part1, api_call_part2=None, api_call_part3=Non
235235
def get(self, identifier1=None, identifier2=None, params=None, data=None):
236236
""" Cloudflare v4 API"""
237237

238-
raise CloudFlareAPIError(0, 'get() call not available for this endpoint')
238+
raise CloudFlareAPIError(0, 'get() call not available for this endpoint')
239239

240240
def patch(self, identifier1=None, identifier2=None, params=None, data=None):
241241
""" Cloudflare v4 API"""
242242

243-
raise CloudFlareAPIError(0, 'patch() call not available for this endpoint')
243+
raise CloudFlareAPIError(0, 'patch() call not available for this endpoint')
244244

245245
def post(self, identifier1=None, identifier2=None, params=None, data=None):
246246
""" Cloudflare v4 API"""
247247

248-
raise CloudFlareAPIError(0, 'post() call not available for this endpoint')
248+
raise CloudFlareAPIError(0, 'post() call not available for this endpoint')
249249

250250
def put(self, identifier1=None, identifier2=None, params=None, data=None):
251251
""" Cloudflare v4 API"""
252252

253-
raise CloudFlareAPIError(0, 'put() call not available for this endpoint')
253+
raise CloudFlareAPIError(0, 'put() call not available for this endpoint')
254254

255255
def delete(self, identifier1=None, identifier2=None, params=None, data=None):
256256
""" Cloudflare v4 API"""
257257

258-
raise CloudFlareAPIError(0, 'delete() call not available for this endpoint')
258+
raise CloudFlareAPIError(0, 'delete() call not available for this endpoint')
259259

260260
class _add_noauth(object):
261261
""" Cloudflare v4 API"""
@@ -281,22 +281,22 @@ def get(self, identifier1=None, identifier2=None, params=None, data=None):
281281
def patch(self, identifier1=None, identifier2=None, params=None, data=None):
282282
""" Cloudflare v4 API"""
283283

284-
raise CloudFlareAPIError(0, 'patch() call not available for this endpoint')
284+
raise CloudFlareAPIError(0, 'patch() call not available for this endpoint')
285285

286286
def post(self, identifier1=None, identifier2=None, params=None, data=None):
287287
""" Cloudflare v4 API"""
288288

289-
raise CloudFlareAPIError(0, 'post() call not available for this endpoint')
289+
raise CloudFlareAPIError(0, 'post() call not available for this endpoint')
290290

291291
def put(self, identifier1=None, identifier2=None, params=None, data=None):
292292
""" Cloudflare v4 API"""
293293

294-
raise CloudFlareAPIError(0, 'put() call not available for this endpoint')
294+
raise CloudFlareAPIError(0, 'put() call not available for this endpoint')
295295

296296
def delete(self, identifier1=None, identifier2=None, params=None, data=None):
297297
""" Cloudflare v4 API"""
298298

299-
raise CloudFlareAPIError(0, 'delete() call not available for this endpoint')
299+
raise CloudFlareAPIError(0, 'delete() call not available for this endpoint')
300300

301301
class _add_with_auth(object):
302302
""" Cloudflare v4 API"""

cli4/cli4.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def convert_virtual_dns_to_identifier(cf, virtual_dns_name):
114114
def walk(m, s):
115115
"""recursive walk of the tree"""
116116
for n in sorted(dir(m)):
117-
if n[0] == '_':
117+
if n[0] == '_':
118118
# internal
119119
continue
120120
if n in ['delete', 'get', 'patch', 'post', 'put']:
@@ -123,10 +123,10 @@ def walk(m, s):
123123
a = getattr(m, n)
124124
d = dir(a)
125125
if '_base' in d:
126-
# it's a known api call - lets print it and continue down the tree
126+
# it's a known api call - lets show the result and continue down the tree
127127
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
128+
# only show the result if a call exists for this part
129+
print(s + '/' + n)
130130
walk(a, s + '/' + n)
131131

132132
def dump_commands(cf):
@@ -326,7 +326,7 @@ def cli4(args):
326326
results = results[0]
327327

328328
if output == 'json':
329-
print json.dumps(results, indent=4, sort_keys=True)
329+
print(json.dumps(results, indent=4, sort_keys=True))
330330
if output == 'yaml' and yaml is not None:
331-
print yaml.safe_dump(results)
331+
print(yaml.safe_dump(results))
332332

examples/example_paging_thru_zones.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def main():
3131
total_count = raw_results['result_info']['total_count']
3232
total_pages = raw_results['result_info']['total_pages']
3333

34-
print "COUNT=%d PAGE=%d PER_PAGE=%d TOTAL_COUNT=%d TOTAL_PAGES=%d -- %s" % (count, page, per_page, total_count, total_pages, domains)
34+
print "COUNT=%d PAGE=%d PER_PAGE=%d TOTAL_COUNT=%d TOTAL_PAGES=%d -- %s" % (count, page, per_page, total_count, total_pages, domains)
3535

3636
if page_number == total_pages:
3737
break

0 commit comments

Comments
 (0)