diff fetch.py @ 54:c62e80b8615a

account for paths that do not exit for the FileFetcher
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 15 Nov 2011 16:20:01 -0800
parents 81fe0523a078
children
line wrap: on
line diff
--- a/fetch.py	Tue Nov 15 16:17:55 2011 -0800
+++ b/fetch.py	Tue Nov 15 16:20:01 2011 -0800
@@ -95,6 +95,10 @@
 
     def __call__(self, dest):
 
+        dirname = os.path.dirname(dest)
+        if not os.path.exists(dirname):
+            os.makedirs(dirname)
+
         if os.path.isdir(dest):
             filename = self.url.rsplit('/', 1)[-1]
             dest = os.path.join(dest, filename)