Commit b94119b0 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

zdtm.py: catch KeyError instead of ValueError for sets

In [3]: a
Out[3]: {1, 2, 3}

In [4]: a.remove(5)
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-4-af76ca25878a> in <module>()
----> 1 a.remove(5)

KeyError: 5
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent af55c059
......@@ -977,7 +977,7 @@ def run_tests(opts):
if not criu_cli.check("userns"):
try:
run_flavs.remove("uns")
except ValueError:
except KeyError:
# don't worry if uns isn't in run_flavs
pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment