[Cdd-commits] r866 - cdd/trunk/webtools

CDD Subversion Commit noreply at alioth.debian.org
Sat Jun 28 06:54:47 UTC 2008


Author: tille
Date: Sat Jun 28 06:54:46 2008
New Revision: 866

Modified:
   cdd/trunk/webtools/tasks.py
Log:
Make sure the output directory can be created


Modified: cdd/trunk/webtools/tasks.py
==============================================================================
--- cdd/trunk/webtools/tasks.py	(original)
+++ cdd/trunk/webtools/tasks.py	Sat Jun 28 06:54:46 2008
@@ -54,8 +54,12 @@
 	try:
 		os.mkdir(data['outputdir'])
 	except:
-    		print >>stderr, "Unable to create output dir " + data['outputdir']
-	        exit(-1)
+		# if more than one dir in the tree has to be crated just use mkdir -p ...
+		try:
+			os.system("mkdir -p %s" % data['outputdir'])
+		except:
+			print >>stderr, "Unable to create output dir " + data['outputdir']
+			exit(-1)
 
 t = datetime.now()
 htaccess = data['outputdir'] + '/.htaccess'



More information about the Cdd-commits mailing list