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

Unified Diff: third_party/gsutil/boto/boto/roboto/awsqueryservice.py

Issue 10199002: Upgrade gsutil to 3.4 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments Created 8 years, 8 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
Index: third_party/gsutil/boto/boto/roboto/awsqueryservice.py
diff --git a/third_party/gsutil/20110627/boto/boto/roboto/awsqueryservice.py b/third_party/gsutil/boto/boto/roboto/awsqueryservice.py
similarity index 84%
rename from third_party/gsutil/20110627/boto/boto/roboto/awsqueryservice.py
rename to third_party/gsutil/boto/boto/roboto/awsqueryservice.py
index 73373402207a7121b3b77883c59e352a87241bef..0ca78c2d7f9268733d59b7feaf237b14c3d21ed7 100644
--- a/third_party/gsutil/20110627/boto/boto/roboto/awsqueryservice.py
+++ b/third_party/gsutil/boto/boto/roboto/awsqueryservice.py
@@ -65,13 +65,17 @@ class AWSQueryService(boto.connection.AWSQueryConnection):
lines = fp.readlines()
fp.close()
for line in lines:
- name, value = line.split('=')
- if name.strip() == 'AWSAccessKeyId':
- if 'aws_access_key_id' not in self.args:
- self.args['aws_access_key_id'] = value.strip()
- elif name.strip() == 'AWSSecretKey':
- if 'aws_secret_access_key' not in self.args:
- self.args['aws_secret_access_key'] = value.strip()
+ if line[0] != '#':
+ if '=' in line:
+ name, value = line.split('=', 1)
+ if name.strip() == 'AWSAccessKeyId':
+ if 'aws_access_key_id' not in self.args:
+ value = value.strip()
+ self.args['aws_access_key_id'] = value
+ elif name.strip() == 'AWSSecretKey':
+ if 'aws_secret_access_key' not in self.args:
+ value = value.strip()
+ self.args['aws_secret_access_key'] = value
else:
print 'Warning: unable to read AWS_CREDENTIAL_FILE'
« no previous file with comments | « third_party/gsutil/boto/boto/roboto/awsqueryrequest.py ('k') | third_party/gsutil/boto/boto/roboto/param.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698