Robert Brewer avatar Robert Brewer committed 1e9920d

Fix for checker breakage when using grafted WSGI apps.

Comments (0)

Files changed (1)

cherrypy/_cpchecker.py

     
     def check_skipped_app_config(self):
         for sn, app in cherrypy.tree.apps.iteritems():
+            if not isinstance(app, cherrypy.Application):
+                continue
             if not app.config:
                 msg = "The Application mounted at %r has an empty config." % sn
                 if self.global_config_contained_paths:
         # Use the dummy Request object in the main thread.
         request = cherrypy.request
         for sn, app in cherrypy.tree.apps.iteritems():
+            if not isinstance(app, cherrypy.Application):
+                continue
             request.app = app
             for section in app.config:
                 # get_resource will populate request.config
         """Process config and warn on each obsolete or deprecated entry."""
         self._compat(cherrypy.config)
         for sn, app in cherrypy.tree.apps.iteritems():
+            if not isinstance(app, cherrypy.Application):
+                continue
             self._compat(app.config)
     
     
     def check_config_namespaces(self):
         """Process config and warn on each unknown config namespace."""
         for sn, app in cherrypy.tree.apps.iteritems():
+            if not isinstance(app, cherrypy.Application):
+                continue
             self._known_ns(app.config)
     
     
         """Assert that config values are of the same type as default values."""
         self._known_types(cherrypy.config)
         for sn, app in cherrypy.tree.apps.iteritems():
+            if not isinstance(app, cherrypy.Application):
+                continue
             self._known_types(app.config)
 
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.