Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: third_party/boto/boto/ecs/__init__.py

Issue 698893003: Update checked in version of gsutil to version 4.6 (Closed) Base URL: http://dart.googlecode.com/svn/third_party/gsutil/
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/boto/boto/ec2/volume.py ('k') | third_party/boto/boto/ecs/item.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/boto/boto/ecs/__init__.py
===================================================================
--- third_party/boto/boto/ecs/__init__.py (revision 33376)
+++ third_party/boto/boto/ecs/__init__.py (working copy)
@@ -21,6 +21,7 @@
import boto
from boto.connection import AWSQueryConnection, AWSAuthConnection
+from boto.exception import BotoServerError
import time
import urllib
import xml.sax
@@ -41,10 +42,13 @@
def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
is_secure=True, port=None, proxy=None, proxy_port=None,
proxy_user=None, proxy_pass=None, host='ecs.amazonaws.com',
- debug=0, https_connection_factory=None, path='/'):
+ debug=0, https_connection_factory=None, path='/',
+ security_token=None, profile_name=None):
super(ECSConnection, self).__init__(aws_access_key_id, aws_secret_access_key,
is_secure, port, proxy, proxy_port, proxy_user, proxy_pass,
- host, debug, https_connection_factory, path)
+ host, debug, https_connection_factory, path,
+ security_token=security_token,
+ profile_name=profile_name)
def _required_auth_capability(self):
return ['ecs']
@@ -64,7 +68,7 @@
if response.status != 200:
boto.log.error('%s %s' % (response.status, response.reason))
boto.log.error('%s' % body)
- raise self.ResponseError(response.status, response.reason, body)
+ raise BotoServerError(response.status, response.reason, body)
if itemSet is None:
rs = ItemSet(self, action, params, page)
@@ -72,6 +76,8 @@
rs = itemSet
h = handler.XmlHandler(rs, self)
xml.sax.parseString(body, h)
+ if not rs.is_valid:
+ raise BotoServerError(response.status, '{Code}: {Message}'.format(**rs.errors[0]))
return rs
#
@@ -88,3 +94,12 @@
"""
params['SearchIndex'] = search_index
return self.get_response('ItemSearch', params)
+
+ def item_lookup(self, **params):
+ """
+ Returns items that satisfy the lookup query.
+
+ For a full list of parameters, see:
+ http://s3.amazonaws.com/awsdocs/Associates/2011-08-01/prod-adv-api-dg-2011-08-01.pdf
+ """
+ return self.get_response('ItemLookup', params)
« no previous file with comments | « third_party/boto/boto/ec2/volume.py ('k') | third_party/boto/boto/ecs/item.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698