Skip to content

Commit

Permalink
Merge pull request #36 from Jimdo/fix_typo
Browse files Browse the repository at this point in the history
Fix typo in exceptions
  • Loading branch information
fstehle authored Sep 27, 2017
2 parents 3c9429a + 06c79c1 commit de1e32c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions library/fastly_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,15 +739,15 @@ def create_cache_settings(self, service_id, version, cache_settings):
if response.status == 200:
return response.payload
else:
raise Exception("Error creating cache_settings for for service %s, version %s (%s)" % (
raise Exception("Error creating cache_settings for service %s, version %s (%s)" % (
service_id, version, response.payload['detail']))

def create_condition(self, service_id, version, condition):
response = self._request('/service/%s/version/%s/condition' % (service_id, version), 'POST', condition)
if response.status == 200:
return response.payload
else:
raise Exception("Error creating condition for for service %s, version %s (%s)" % (
raise Exception("Error creating condition for service %s, version %s (%s)" % (
service_id, version, response.payload['detail']))

def create_gzip(self, service_id, version, gzip):
Expand All @@ -756,15 +756,15 @@ def create_gzip(self, service_id, version, gzip):
if response.status == 200:
return response.payload
else:
raise Exception("Error creating gzip for for service %s, version %s (%s)" % (
raise Exception("Error creating gzip for service %s, version %s (%s)" % (
service_id, version, response.payload['detail']))

def create_header(self, service_id, version, header):
response = self._request('/service/%s/version/%s/header' % (service_id, version), 'POST', header)
if response.status == 200:
return response.payload
else:
raise Exception("Error creating header for for service %s, version %s (%s)" % (
raise Exception("Error creating header for service %s, version %s (%s)" % (
service_id, version, response.payload['detail']))

def create_request_setting(self, service_id, version, request_setting):
Expand All @@ -773,7 +773,7 @@ def create_request_setting(self, service_id, version, request_setting):
if response.status == 200:
return response.payload
else:
raise Exception("Error creating request setting for for service %s, version %s (%s)" % (
raise Exception("Error creating request setting for service %s, version %s (%s)" % (
service_id, version, response.payload['detail']))

def create_response_object(self, service_id, version, response_object):
Expand All @@ -782,7 +782,7 @@ def create_response_object(self, service_id, version, response_object):
if response.status == 200:
return response.payload
else:
raise Exception("Error creating response object for for service %s, version %s (%s)" % (
raise Exception("Error creating response object for service %s, version %s (%s)" % (
service_id, version, response.payload['detail']))

def create_vcl_snippet(self, service_id, version, vcl_snippet):
Expand All @@ -798,7 +798,7 @@ def create_settings(self, service_id, version, settings):
if response.status == 200:
return response.payload
else:
raise Exception("Error creating settings for for service %s, version %s (%s)" % (
raise Exception("Error creating settings for service %s, version %s (%s)" % (
service_id, version, response.payload['detail']))


Expand Down

0 comments on commit de1e32c

Please sign in to comment.