Changeset 2051
- Timestamp:
- 10/30/08 10:05:37
- Files:
-
- trunk/cherrypy/_cptree.py (modified) (1 diff)
- trunk/cherrypy/test/test_objectmapping.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cptree.py
r2049 r2051 171 171 if isinstance(root, Application): 172 172 app = root 173 if script_name != "" :174 raise ValueError, "Cannot specify a script name and pass an Application instance to cherrypy.mount"173 if script_name != "" and script_name != app.script_name: 174 raise ValueError, "Cannot specify a different script name and pass an Application instance to cherrypy.mount" 175 175 script_name = app.script_name 176 176 else: trunk/cherrypy/test/test_objectmapping.py
r2049 r2051 332 332 self.assertRaises(ValueError, cherrypy.tree.mount, a, '/somewhereelse') 333 333 334 # When mounting an application instance, 335 # we can't specify a script name in the call to mount. 336 a = Application(object(), '/somewhere') 337 try: 338 cherrypy.tree.mount(a, '/somewhere') 339 except ValueError: 340 self.fail("tree.mount must allow script_names which are the same") 341 334 342 try: 335 343 cherrypy.tree.mount(a)

