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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user