comparison paint/package.py @ 47:213cf933366d

stupid mistakes
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 02 Apr 2012 14:27:53 -0700
parents bb0813966bff
children abfb267e8332
comparison
equal deleted inserted replaced
46:bb3c646e9516 47:213cf933366d
285 os.makedirs(directory) 285 os.makedirs(directory)
286 assert os.path.isdir(directory) 286 assert os.path.isdir(directory)
287 tempdir = tempfile.mkdtemp() 287 tempdir = tempfile.mkdtemp()
288 try: 288 try:
289 self.download(tempdir) 289 self.download(tempdir)
290 for package in os.listdir(tempdir): 290 for f in os.listdir(tempdir):
291 291
292 # full path 292 # full path
293 src = os.path.join(tempdir, package) 293 src = os.path.join(tempdir, f)
294 294
295 # make a package of the thing 295 # make a package of the thing
296 package = Package(src) 296 package = Package(src)
297 297
298 # get destination dirname, filename 298 # get destination dirname, filename
303 if not os.path.exists(subdir): 303 if not os.path.exists(subdir):
304 os.makedirs(subdir) 304 os.makedirs(subdir)
305 assert os.path.isdir(subdir) 305 assert os.path.isdir(subdir)
306 306
307 # move the file 307 # move the file
308 self.package(destination=os.path.join(subdir, filename)) 308 package.package(destination=os.path.join(subdir, filename))
309 finally: 309 finally:
310 shutil.rmtree(tempdir) 310 shutil.rmtree(tempdir)
311 311
312 def pypi_path(self): 312 def pypi_path(self):
313 """ 313 """