Commit 2076a160 authored by Pavel Emelyanov's avatar Pavel Emelyanov

zdtmpy: Fix flake8 warnings

Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 7df7d9bb
...@@ -20,7 +20,6 @@ import fcntl ...@@ -20,7 +20,6 @@ import fcntl
import errno import errno
import datetime import datetime
import yaml import yaml
import socket
import criu as crpc import criu as crpc
os.chdir(os.path.dirname(os.path.abspath(__file__))) os.chdir(os.path.dirname(os.path.abspath(__file__)))
...@@ -679,6 +678,7 @@ class criu_cli: ...@@ -679,6 +678,7 @@ class criu_cli:
cr = subprocess.Popen(strace + [criu_bin, action] + args, env = env, preexec_fn = preexec) cr = subprocess.Popen(strace + [criu_bin, action] + args, env = env, preexec_fn = preexec)
return cr.wait() return cr.wait()
class criu_rpc: class criu_rpc:
@staticmethod @staticmethod
def __set_opts(criu, args, ctx): def __set_opts(criu, args, ctx):
...@@ -730,7 +730,7 @@ class criu_rpc: ...@@ -730,7 +730,7 @@ class criu_rpc:
if action == 'dump': if action == 'dump':
criu.dump() criu.dump()
elif action == 'restore': elif action == 'restore':
if not ctx.has_key('rd'): if 'rd' not in ctx:
raise test_fail_exc('RPC Non-detached restore is impossible') raise test_fail_exc('RPC Non-detached restore is impossible')
res = criu.restore() res = criu.restore()
...@@ -745,6 +745,7 @@ class criu_rpc: ...@@ -745,6 +745,7 @@ class criu_rpc:
os.close(imgd) os.close(imgd)
return 0 return 0
class criu: class criu:
def __init__(self, opts): def __init__(self, opts):
self.__test = None self.__test = None
......
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