From 7a1bb224f73c4107bc1532577d44fd8d46f09ffc Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sun, 7 Dec 2014 20:26:07 +0100 Subject: [PATCH] py3: Avoid indexing exception objects It doesn't work on Python 3. --- tests/mpd/test_exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/mpd/test_exceptions.py b/tests/mpd/test_exceptions.py index a54f9e20..d055ef7e 100644 --- a/tests/mpd/test_exceptions.py +++ b/tests/mpd/test_exceptions.py @@ -13,7 +13,7 @@ class MpdExceptionsTest(unittest.TestCase): try: raise KeyError('Track X not found') except KeyError as e: - raise MpdAckError(e[0]) + raise MpdAckError(e.message) except MpdAckError as e: self.assertEqual(e.message, 'Track X not found')