From 27bb4eab8db21bb59d7629b7ccdba6134b6110b7 Mon Sep 17 00:00:00 2001 From: Pierce Lopez Date: Mon, 1 Jan 2018 14:22:58 -0500 Subject: [PATCH] fix "unused variable" flake warnings in iostream_test, and an exception var in tornado.routing that only python2 pyflakes caught --- tornado/routing.py | 2 +- tornado/test/iostream_test.py | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/tornado/routing.py b/tornado/routing.py index f2302a8a5..d3f17803b 100644 --- a/tornado/routing.py +++ b/tornado/routing.py @@ -582,7 +582,7 @@ class PathMatches(Matcher): else: try: unescaped_fragment = re_unescape(fragment) - except ValueError as exc: + except ValueError: # If we can't unescape part of it, we can't # reverse this url. return (None, None) diff --git a/tornado/test/iostream_test.py b/tornado/test/iostream_test.py index f7c80451a..8aef35208 100644 --- a/tornado/test/iostream_test.py +++ b/tornado/test/iostream_test.py @@ -1173,7 +1173,6 @@ class TestStreamBuffer(unittest.TestCase): def check_append_all_then_skip_all(self, buf, objs, input_type): self.assertEqual(len(buf), 0) - total_expected = b''.join(objs) expected = b'' for o in objs: @@ -1182,8 +1181,6 @@ class TestStreamBuffer(unittest.TestCase): self.assertEqual(len(buf), len(expected)) self.check_peek(buf, expected) - total_size = len(expected) - while expected: n = self.random.randrange(1, len(expected) + 1) expected = expected[n:] -- 2.47.2