[etwist] log missing file even in debug mode
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 28 Jun 2011 17:59:31 +0200
changeset 7570 648bf83945a5
parent 7569 02c338197322
child 7574 34154f48d255
[etwist] log missing file even in debug mode
etwist/server.py
--- a/etwist/server.py	Tue Jun 28 16:33:53 2011 +0200
+++ b/etwist/server.py	Tue Jun 28 17:59:31 2011 +0200
@@ -193,13 +193,12 @@
             for path in paths:
                 dirpath, rid = self._resource(path)
                 if rid is None:
+                    # In production mode log an error, do not return a 404
+                    # XXX the erroneous content is cached anyway
+                    LOGGER.error('concatenated data url error: %r file '
+                                 'does not exist', path)
                     if self.config.debugmode:
                         raise ConcatFileNotFoundError(path)
-                    else:
-                        # In production mode log an error, do not return a 404
-                        # XXX the erroneous content is cached anyway
-                        LOGGER.error('concatenated data url error: %r file '
-                                     'does not exist', path)
                 else:
                     concat_data.append(open(osp.join(dirpath, rid)).read())
             with open(filepath, 'wb') as f: