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

Unified Diff: boto/iam/summarymap.py

Issue 8386013: Merging in latest boto. (Closed) Base URL: svn://svn.chromium.org/boto
Patch Set: Redoing vendor drop by deleting and then merging. Created 9 years, 2 months 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 | « boto/iam/connection.py ('k') | boto/jsonresponse.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: boto/iam/summarymap.py
diff --git a/boto/s3/prefix.py b/boto/iam/summarymap.py
similarity index 72%
copy from boto/s3/prefix.py
copy to boto/iam/summarymap.py
index fc0f26ab58ae063bce32b60d916709c5858e1002..00023895f32c44ef27a050d0f3fa4bece12de4c8 100644
--- a/boto/s3/prefix.py
+++ b/boto/iam/summarymap.py
@@ -1,4 +1,5 @@
-# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/
+# Copyright (c) 2010, Eucalyptus Systems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
@@ -14,22 +15,28 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-class Prefix:
- def __init__(self, bucket=None, name=None):
- self.bucket = bucket
- self.name = name
+class SummaryMap(dict):
+
+ def __init__(self, parent=None):
+ self.parent = parent
+ dict.__init__(self)
def startElement(self, name, attrs, connection):
- return None
+ pass
def endElement(self, name, value, connection):
- if name == 'Prefix':
- self.name = value
+ if name == 'key':
+ self._name = value
+ elif name == 'value':
+ try:
+ self[self._name] = int(value)
+ except ValueError:
+ self[self._name] = value
else:
setattr(self, name, value)
« no previous file with comments | « boto/iam/connection.py ('k') | boto/jsonresponse.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698