From 79ec3d81c1c0e4db7eb800e69f2c7aab3d8d02b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Neuha=CC=88user?= Date: Wed, 22 May 2013 22:58:12 +0200 Subject: [PATCH] Prevent UnboundLocalError in test_build_error_handler --- flask/testsuite/basic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flask/testsuite/basic.py b/flask/testsuite/basic.py index 485ed5fd..656233b8 100644 --- a/flask/testsuite/basic.py +++ b/flask/testsuite/basic.py @@ -753,8 +753,8 @@ class BasicFunctionalityTestCase(FlaskTestCase): try: with app.test_request_context(): flask.url_for('spam') - except BuildError as error: - pass + except BuildError as err: + error = err try: raise RuntimeError('Test case where BuildError is not current.') except RuntimeError: