diff options
author | Dan Crosta <dcrosta@10gen.com> | 2012-02-16 21:51:26 -0500 |
---|---|---|
committer | Dan Crosta <dcrosta@10gen.com> | 2012-02-16 21:51:26 -0500 |
commit | fc7cac22396ea51d38591ccda973714f815304f3 (patch) | |
tree | c0897f4fa4c67b2fe47c6fe393fb9686de8249ae /buildscripts/utils.py | |
parent | 31991afed8aa8302d649b6079ab9c6dd0d52650c (diff) | |
download | mongo-fc7cac22396ea51d38591ccda973714f815304f3.tar.gz |
BUILDBOT-58: use s3tool to do s3-related work (and remove old, unused s3 scripts)
Diffstat (limited to 'buildscripts/utils.py')
-rw-r--r-- | buildscripts/utils.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/buildscripts/utils.py b/buildscripts/utils.py index d293d89c4e3..74db376208c 100644 --- a/buildscripts/utils.py +++ b/buildscripts/utils.py @@ -182,3 +182,15 @@ def smoke_command(*args): (find_python(), smoke_py), args)) +def run_s3tool(settings_file, bucket_name, command, *args): + if settings_file.endswith('.pyc'): + settings_file = settings_file[:-1] + + here = os.path.dirname(__file__) + s3tool = os.path.join(here, 's3tool') + cmd = [find_python(), s3tool, '--config=%s' % settings_file, bucket_name, command] + cmd.extend(args) + print ' '.join(cmd) + exitcode = subprocess.call(cmd) + return exitcode == 0 + |