3
3
4
4
import urlparse
5
5
import requests
6
- import exception
6
+ import exceptions
7
7
8
8
9
9
# Default api.ciscospark.com base URL
@@ -23,7 +23,7 @@ def _validate_base_url(base_url):
23
23
else :
24
24
error_message = "base_url must contain a valid scheme (protocol " \
25
25
"specifier) and network location (hostname)"
26
- raise exception .CiscoSparkApiException (error_message )
26
+ raise exceptions .CiscoSparkApiException (error_message )
27
27
28
28
29
29
def _raise_if_extra_kwargs (kwargs ):
@@ -33,9 +33,9 @@ def _raise_if_extra_kwargs(kwargs):
33
33
34
34
def _check_response_code (response , erc ):
35
35
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 )
39
39
40
40
41
41
def _extract_and_parse_json (response ):
@@ -137,7 +137,7 @@ def get_items(self, url, params=None, **kwargs):
137
137
else :
138
138
error_message = "'items' object not found in JSON data: %r" \
139
139
% json_page
140
- raise exception .CiscoSparkApiException (error_message )
140
+ raise exceptions .CiscoSparkApiException (error_message )
141
141
142
142
def post (self , url , json_dict , ** kwargs ):
143
143
# Process args
0 commit comments