diff makeitso/makeitso.py @ 25:fbf19940fa97

remove the staging directory you attempted to download
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 30 Nov 2010 09:23:46 -0800
parents 1b802678b341
children 044ac9e0b29c
line wrap: on
line diff
--- a/makeitso/makeitso.py	Tue Nov 30 09:21:22 2010 -0800
+++ b/makeitso/makeitso.py	Tue Nov 30 09:23:46 2010 -0800
@@ -5,6 +5,7 @@
 
 import os
 import re
+import shutil
 import subprocess
 import sys
 import tempfile
@@ -20,15 +21,17 @@
 tempita_location = 'http://bitbucket.org/ianb/tempita/raw-file/tip/tempita/'
 
 def cleanup():
+
+    # remove temporary net module directory
     if 'tempdir' in globals():
-        ### TODO: remove it
-        pass
+        shutil.remove(tempdir)
 
 try:
     import tempita
 except ImportError:
 
     # Get tempita from the net
+    # TODO: abstract this to get arbitrary modules from the net
     def getFiles(url, subdir, files):
         """
         fetch files from the internet