comparison carton.py @ 14:c474362cf69a

allow fetching of remote tarballs
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 08 Jul 2011 15:23:04 -0700
parents f522620c6a78
children f05e636b7444
comparison
equal deleted inserted replaced
13:f522620c6a78 14:c474362cf69a
138 source_array = [] 138 source_array = []
139 for source in sources: 139 for source in sources:
140 buffer = None 140 buffer = None
141 141
142 if isURL(source): 142 if isURL(source):
143 # remote tarball 143 # remote tarball or resource
144 raise NotImplementedError 144 buffer = urllib2.urlopen(source).read()
145 else: 145 else:
146 assert os.path.exists(source), "%s does not exist" % source 146 assert os.path.exists(source), "%s does not exist" % source
147 147
148 # local directory or tarball 148 # local directory or tarball
149 if (not os.path.isdir(source)) and tarfile.is_tarfile(source): 149 if (not os.path.isdir(source)) and tarfile.is_tarfile(source):