From fc7cac22396ea51d38591ccda973714f815304f3 Mon Sep 17 00:00:00 2001 From: Dan Crosta Date: Thu, 16 Feb 2012 21:51:26 -0500 Subject: BUILDBOT-58: use s3tool to do s3-related work (and remove old, unused s3 scripts) --- buildscripts/utils.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'buildscripts/utils.py') 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 + -- cgit v1.2.1