[CRIU] [PATCH 1/2] zdtm: fix decode_flav()
Andrei Vagin
avagin at virtuozzo.com
Thu Mar 16 15:01:40 PDT 2017
Applied, thanks
On Thu, Mar 16, 2017 at 05:38:17PM +0100, Adrian Reber wrote:
> From: Adrian Reber <areber at redhat.com>
>
> decode_flav() was doing 'if i in flavors:' where 'i' was an integer but
> the keys from the flavors dict are strings 'h', 'ns' and 'uns'.
>
> Signed-off-by: Adrian Reber <areber at redhat.com>
> ---
> test/zdtm.py | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/test/zdtm.py b/test/zdtm.py
> index e88de05..b04b779 100755
> --- a/test/zdtm.py
> +++ b/test/zdtm.py
> @@ -291,10 +291,10 @@ def encode_flav(f):
>
>
> def decode_flav(i):
> - i = i - 128
> - if i in flavors:
> + try:
> return flavors.keys()[i - 128]
> - return "unknown"
> + except:
> + return "unknown"
>
>
> def tail(path):
> --
> 2.9.3
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list