Permalink
Browse files

Merge pull request #693 from apieceofredcloth/master

Allow lists as well as tuples in handler definitions
  • Loading branch information...
2 parents 8eacd5b + 1dad281 commit 75a294683c1d5d4613229e03753986e0553b089f @bdarnell bdarnell committed Apr 14, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 tornado/web.py
View
@@ -1362,7 +1362,7 @@ def add_handlers(self, host_pattern, host_handlers):
self.handlers.append((re.compile(host_pattern), handlers))
for spec in host_handlers:
- if isinstance(spec, type(())):
+ if isinstance(spec, (tuple, list)):
assert len(spec) in (2, 3)
pattern = spec[0]
handler = spec[1]

0 comments on commit 75a2946

Please sign in to comment.