Skip to content

Commit 58b18e6

Browse files
author
Oleh Bahinskyi
committed
pep8
1 parent d28a861 commit 58b18e6

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

examples/number_available_list.py

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,38 @@
1414
args = vars(parser.parse_args())
1515

1616
try:
17-
# Create a MessageBird client with the specified accessKey.
18-
client = messagebird.Client(args['accessKey'])
19-
20-
# Fetch the NumberList object with specified params, limit, offset.
21-
params = {'features': ['sms', 'voice'], 'number': 319}
22-
numbers = client.available_numbers_list('NL', params, 2, 0)
23-
24-
# Print the object information.
25-
print('\nThe following information was returned as a %s object:\n' % numbers.__class__)
26-
if numbers.items is not None:
27-
print(' Containing the the following items:')
28-
for item in numbers.items:
29-
print(' {')
30-
print(' number : %s' % item.number)
31-
print(' country : %s' % item.country)
32-
print(' region : %s' % item.region)
33-
print(' locality : %s' % item.locality)
34-
print(' features : %s' % item.features)
35-
print(' tags : %s' % item.tags)
36-
print(' type : %s' % item.type)
37-
print(' status : %s' % item.status)
38-
print(' },')
39-
else:
40-
print(' With an empty response.')
17+
# Create a MessageBird client with the specified accessKey.
18+
client = messagebird.Client(args['accessKey'])
19+
20+
# Fetch the NumberList object with specified params, limit, offset.
21+
params = {'features': ['sms', 'voice'], 'number': 319}
22+
numbers = client.available_numbers_list('NL', params, 2, 0)
23+
24+
# Print the object information.
25+
print('\nThe following information was returned as a %s object:\n' % numbers.__class__)
26+
if numbers.items is not None:
27+
print(' Containing the the following items:')
28+
for item in numbers.items:
29+
print(' {')
30+
print(' number : %s' % item.number)
31+
print(' country : %s' % item.country)
32+
print(' region : %s' % item.region)
33+
print(' locality : %s' % item.locality)
34+
print(' features : %s' % item.features)
35+
print(' tags : %s' % item.tags)
36+
print(' type : %s' % item.type)
37+
print(' status : %s' % item.status)
38+
print(' },')
39+
else:
40+
print(' With an empty response.')
4141

4242
except messagebird.client.ErrorException as e:
43-
print('\nAn error occured while requesting a NumberList object:\n')
43+
print('\nAn error occured while requesting a NumberList object:\n')
4444

45-
for error in e.errors:
46-
print(' code : %d' % error.code)
47-
print(' description : %s' % error.description)
48-
print(' parameter : %s\n' % error.parameter)
45+
for error in e.errors:
46+
print(' code : %d' % error.code)
47+
print(' description : %s' % error.description)
48+
print(' parameter : %s\n' % error.parameter)
4949

5050
except requests.exceptions.HTTPError as e:
5151
print('\nAn HTTP exception occurred while fetching all purchased phone numbers:')

0 commit comments

Comments
 (0)