test/lvol: Remove python2 syntax from test cases
Python3 does not support the "except Exception, name:" syntax used in test_cases.py Change-Id: Ie90888d715c97c94c7686b797d955df2ead61915 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/410937 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
4d8c6a8440
commit
61770b52e3
@ -176,7 +176,7 @@ class TestCases(object):
|
||||
try:
|
||||
process = subprocess.check_output(cmp_cmd, stderr=subprocess.STDOUT, shell=True)
|
||||
rv = 0
|
||||
except subprocess.CalledProcessError, ex:
|
||||
except subprocess.CalledProcessError as ex:
|
||||
rv = 1
|
||||
except Exception as e:
|
||||
print("ERROR: Cmp ended with unexpected exception.")
|
||||
@ -204,7 +204,7 @@ class TestCases(object):
|
||||
for count in range(30):
|
||||
sleep(1)
|
||||
kill(pid, 0)
|
||||
except OSError, err:
|
||||
except OSError as err:
|
||||
if err.errno == ESRCH:
|
||||
pass
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user