aboutsummaryrefslogtreecommitdiffstats
path: root/.travis/install
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2015-01-26 18:13:55 +0100
committerMarius Halden <marius.h@lden.org>2015-01-26 18:13:55 +0100
commit1c5c685d0b0904e7ddc6e764e58e8fae08632d1d (patch)
tree559d5fddb743c1c083e23c9a3831efea92a240cb /.travis/install
parent84de1b811a219c41adbdcc8b65851320a77e98f7 (diff)
parent04117b8be30b5d82d50cdc047ac4e7c19864f8ed (diff)
Merge tag 'v1.5.3' into fiksgatami-dev
Diffstat (limited to '.travis/install')
-rwxr-xr-x.travis/install16
1 files changed, 5 insertions, 11 deletions
diff --git a/.travis/install b/.travis/install
index 8514e801d..c766d3598 100755
--- a/.travis/install
+++ b/.travis/install
@@ -4,28 +4,22 @@ import hashlib
import os
import sys
import tarfile
-
-import boto
-from boto.s3.key import Key
-from boto.exception import S3ResponseError
+import urllib
root = os.path.join(os.path.dirname(__file__), '..')
with open(os.path.join(root, 'cpanfile.snapshot')) as cpanfile:
hash = hashlib.md5(cpanfile.read()).hexdigest()
wanted_filename = 'fixmystreet-local-%s.tgz' % hash
-conn = boto.connect_s3()
-bucket = conn.get_bucket('fixmystreet-bundle-cache')
-
-k = Key(bucket)
-k.key = wanted_filename
+url = 'https://fixmystreet-bundle-cache.s3.amazonaws.com/%s' % wanted_filename
try:
- k.get_contents_to_filename(wanted_filename)
+ urllib.urlretrieve(url, wanted_filename)
if tarfile.is_tarfile(wanted_filename):
tfile = tarfile.open(wanted_filename)
tfile.extractall()
+ print "Cached copy found and extracted"
sys.exit(0)
-except S3ResponseError:
+except IOError:
os.remove(wanted_filename)
print "No cached copy found, running carton install..."