Skip to content

Commit 6798e69

Browse files
committed
Rename exception.py to plural
Make module names plural to be consistent with Spark API package sub-modules.
1 parent 23d2cad commit 6798e69

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

ciscosparkapi/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
import exception
2-
import restsession
1+
import exceptions
2+
import restsession
File renamed without changes.

ciscosparkapi/restsession.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import urlparse
55
import requests
6-
import exception
6+
import exceptions
77

88

99
# Default api.ciscospark.com base URL
@@ -23,7 +23,7 @@ def _validate_base_url(base_url):
2323
else:
2424
error_message = "base_url must contain a valid scheme (protocol " \
2525
"specifier) and network location (hostname)"
26-
raise exception.CiscoSparkApiException(error_message)
26+
raise exceptions.CiscoSparkApiException(error_message)
2727

2828

2929
def _raise_if_extra_kwargs(kwargs):
@@ -33,9 +33,9 @@ def _raise_if_extra_kwargs(kwargs):
3333

3434
def _check_response_code(response, erc):
3535
if response.status_code != erc:
36-
raise exception.CiscoSparkApiError(response.status_code,
37-
request=response.request,
38-
response=response)
36+
raise exceptions.CiscoSparkApiError(response.status_code,
37+
request=response.request,
38+
response=response)
3939

4040

4141
def _extract_and_parse_json(response):
@@ -137,7 +137,7 @@ def get_items(self, url, params=None, **kwargs):
137137
else:
138138
error_message = "'items' object not found in JSON data: %r" \
139139
% json_page
140-
raise exception.CiscoSparkApiException(error_message)
140+
raise exceptions.CiscoSparkApiException(error_message)
141141

142142
def post(self, url, json_dict, **kwargs):
143143
# Process args

0 commit comments

Comments
 (0)