changeset 30:81607129a45e

better error message
author egj@socialplanning.org
date Tue, 02 Feb 2010 18:02:27 +0000
parents d1b1019d9254
children 89a72b2fd149
files decoupage/web.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/decoupage/web.py	Mon Jan 04 04:26:32 2010 +0000
+++ b/decoupage/web.py	Tue Feb 02 18:02:27 2010 +0000
@@ -39,7 +39,9 @@
         self.directory = self.directory.rstrip(os.path.sep)
         assert os.path.isdir(self.directory)
         self.template_directories = self.template_directories.split() # no spaces in directory names, for now
-        assert sum([os.path.isdir(directory) for directory in self.template_directories]) == len(self.template_directories)
+
+        for directory in self.template_directories:
+            assert os.path.isdir(directory), "Decoupage template directory %s does not exist!" % directory
 
         # static file server
         self.fileserver = FileApp