[Checkins] SVN: zc.resourcelibrary/trunk/src/zc/resourcelibrary/publication.py If the site is not set, do nothing, because it means that an exception has been raised while publishing the request and we don't want to swallow it.

Malthe Borch mborch at gmail.com
Tue May 5 04:19:52 EDT 2009


Log message for revision 99764:
  If the site is not set, do nothing, because it means that an exception has been raised while publishing the request and we don't want to swallow it.

Changed:
  U   zc.resourcelibrary/trunk/src/zc/resourcelibrary/publication.py

-=-
Modified: zc.resourcelibrary/trunk/src/zc/resourcelibrary/publication.py
===================================================================
--- zc.resourcelibrary/trunk/src/zc/resourcelibrary/publication.py	2009-05-04 23:36:50 UTC (rev 99763)
+++ zc.resourcelibrary/trunk/src/zc/resourcelibrary/publication.py	2009-05-05 08:19:52 UTC (rev 99764)
@@ -104,9 +104,8 @@
         # generate the HTML that will be included in the response
         site = getSite()
         if site is None:
-            raise RuntimeError(
-                "Unable to locate resources; no site has been set.")
-
+            return None
+        
         # look up resources view factory
         factory = getSiteManager().adapters.lookup(
             (ISite, interface.providedBy(self._request)),



More information about the Checkins mailing list