Use except x as y instead of except x, y

According to https://docs.python.org/3/howto/pyporting.html the
syntax changed in Python 3.x. The new syntax is usable with
Python >= 2.6 and should be preferred to be compatible with Python3.

Change-Id: I4a951aecc32ef9e5131da236ae4815b84897d67b
This commit is contained in:
Christian Berendt
2014-06-03 07:53:11 +02:00
parent cda9fcb00f
commit 8e65d181d2
7 changed files with 10 additions and 10 deletions

View File

@@ -86,7 +86,7 @@ class ParameterTestCase(PackstackTestCaseMixin, TestCase):
execute('echo "mask the password" && exit 1',
use_shell=True, mask_list=['password'])
raise AssertionError('Masked execution failed.')
except ExecuteRuntimeError, ex:
except ExecuteRuntimeError as ex:
should_be = ('Failed to execute command, stdout: mask the %s\n\n'
'stderr: ' % STR_MASK)
self.assertEqual(str(ex), should_be)