Permalink
Browse files

Log a warning when multiple handlers have the same name.

  • Loading branch information...
1 parent b5365d8 commit 002ba2c1801e963a9cfaf3f023d464c12ae16a42 Ben Darnell committed Apr 5, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 tornado/web.py
View
@@ -961,6 +961,10 @@ def add_handlers(self, host_pattern, host_handlers):
spec = URLSpec(pattern, handler, kwargs)
handlers.append(spec)
if spec.name:
+ if spec.name in self.named_handlers:
+ _log.warning(
+ "Multiple handlers named %s; replacing previous value",
+ spec.name)
self.named_handlers[spec.name] = spec
def add_transform(self, transform_class):

0 comments on commit 002ba2c

Please sign in to comment.