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

Unified Diff: tools/utils.py

Issue 2710333004: Disable usage of site_config boto file (Closed)
Patch Set: change exit args Created 3 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/utils.py
diff --git a/tools/utils.py b/tools/utils.py
index d42abb15ca4de1791313fd73938d5578e719afa6..b89d227d7d59a53df4f5931e3f5a84613fe37d4e 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -702,6 +702,25 @@ class UnexpectedCrash(object):
def __str__(self):
return "%s: %s %s" % (self.test, self.binary, self.pid)
+class SiteConfigBotoFileDisabler(object):
+ def __init__(self):
+ self._old_aws = None
+ self._old_boto = None
+
+ def __enter__(self):
+ self._old_aws = os.environ.get('AWS_CREDENTIAL_FILE', None)
+ self._old_boto = os.environ.get('BOTO_CONFIG', None)
+
+ if self._old_aws:
+ del os.environ['AWS_CREDENTIAL_FILE']
+ if self._old_boto:
+ del os.environ['BOTO_CONFIG']
+
+ def __exit__(self, *_):
+ if self._old_aws:
+ os.environ['AWS_CREDENTIAL_FILE'] = self._old_aws
+ if self._old_boto:
+ os.environ['BOTO_CONFIG'] = self._old_boto
class PosixCoredumpEnabler(object):
def __init__(self):
@@ -832,8 +851,12 @@ class BaseCoreDumpArchiver(object):
print '----> %s' % crash
sys.stdout.flush()
- self._archive(archive_crashes)
+ # We disable usage of the boto file installed on the bots due to an
+ # issue introduced by
+ # https://chrome-internal-review.googlesource.com/c/331136
+ with SiteConfigBotoFileDisabler():
+ self._archive(archive_crashes)
finally:
self._cleanup()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698