changeset 4:e5efa999911a

make sure self.app is actually callable
author k0s <k0scist@gmail.com>
date Sun, 27 Dec 2009 16:30:29 -0500
parents bb2d34fb5de4
children 04a77bdafaec
files uploader/dispatcher.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/uploader/dispatcher.py	Sun Dec 27 16:27:34 2009 -0500
+++ b/uploader/dispatcher.py	Sun Dec 27 16:30:29 2009 -0500
@@ -19,6 +19,8 @@
         for key in self.defaults:
             setattr(self, key, kw.get(key, self.defaults[key]))
         assert os.path.exists(self.directory)
+        if self.app:
+            assert hasattr(self.app, '__call__')
         self.auth = self.auth.lower() == 'true'
         self.subpath = self.subpath.lower() == 'true'
         if self.subpath: