]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
fix "unused variable" flake warnings
authorPierce Lopez <pierce.lopez@gmail.com>
Mon, 1 Jan 2018 19:22:58 +0000 (14:22 -0500)
committerPierce Lopez <pierce.lopez@gmail.com>
Mon, 1 Jan 2018 20:56:23 +0000 (15:56 -0500)
in iostream_test, and
an exception var in tornado.routing that only python2 pyflakes caught

tornado/routing.py
tornado/test/iostream_test.py

index f2302a8a539f13b36921d762eceec6bf6408c1aa..d3f17803b39a4d248956868076082b908470cc7b 100644 (file)
@@ -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)
index f7c80451a43375ce96f6cc0c5c64a9924b2c07c1..8aef352081efeb3bc8649717899234edb1357d16 100644 (file)
@@ -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:]