Skip to content

Commit

Permalink
Using the new error message in API
Browse files Browse the repository at this point in the history
Thx @xela7
  • Loading branch information
koalalorenzo committed Sep 12, 2013
1 parent e6383cc commit 4d7f34c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion digitalocean/Domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __call_api(self, path, params=dict()):
data = r.json()
self.call_response = data
if data['status'] != "OK":
raise Exception(data[u'error_message'])
raise Exception(data[u'message'])

return data

Expand Down
2 changes: 1 addition & 1 deletion digitalocean/Droplet.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __call_api(self, path, params=dict()):
data = r.json()
self.call_response = data
if data['status'] != "OK":
raise Exception(data[u'error_message'])
raise Exception(data[u'message'])
#add the event to the object's event list.
event_id = data.get(u'event_id',None)
if not event_id and u'event_id' in data.get(u'droplet',{}):
Expand Down
2 changes: 1 addition & 1 deletion digitalocean/Event.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __call_api(self, path, params=dict()):
data = r.json()
self.call_response = data
if data['status'] != "OK":
raise Exception(data[u'error_message'])
raise Exception(data[u'message'])
return data

def load(self):
Expand Down
2 changes: 1 addition & 1 deletion digitalocean/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __call_api(self, path, params=dict()):
data = r.json()
self.call_response = data
if data['status'] != "OK":
raise Exception(data[u'error_message'])
raise Exception(data[u'message'])

return data

Expand Down
2 changes: 1 addition & 1 deletion digitalocean/Record.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __call_api(self, path, params=dict()):
data = r.json()
self.call_response = data
if data['status'] != "OK":
raise Exception(data[u'error_message'])
raise Exception(data[u'message'])
return data

def create(self):
Expand Down
2 changes: 1 addition & 1 deletion digitalocean/SSHKey.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __call_api(self, path, params=dict()):
data = r.json()
self.call_response = data
if data['status'] != "OK":
raise Exception(data[u'error_message'])
raise Exception(data[u'message'])

return data

Expand Down

0 comments on commit 4d7f34c

Please sign in to comment.