From 7893d43a8f7d3e42b21491444156c4a5308e211d Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Tue, 16 Sep 2014 15:08:28 -0500 Subject: [PATCH] Fix exception catching on python 3 This commit sponsored by Paul Smith. Thank you! --- mediagoblin/tests/test_metadata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mediagoblin/tests/test_metadata.py b/mediagoblin/tests/test_metadata.py index b4ea646e..a10e00ec 100644 --- a/mediagoblin/tests/test_metadata.py +++ b/mediagoblin/tests/test_metadata.py @@ -56,7 +56,7 @@ class TestMetadataFunctionality: jsonld_fail_1 = None try: jsonld_fail_1 = compact_and_validate(metadata_fail_1) - except ValidationError, e: + except ValidationError as e: assert e.message == "'All Rights Reserved.' is not a 'uri'" assert jsonld_fail_1 == None #,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,., @@ -72,7 +72,7 @@ class TestMetadataFunctionality: jsonld_fail_2 = None try: jsonld_fail_2 = compact_and_validate(metadata_fail_2) - except ValidationError, e: + except ValidationError as e: assert e.message == "'The other day' is not a 'date-time'" assert jsonld_fail_2 == None -- 2.25.1