mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
test/zdtm: remove redundant variable initializations
Remove C-style pre-initializations of variables that are always set before use. Python does not require variables to be declared before assignment, so sentinel values like `pid = -1`, `status = -1`, and `stats_written = -1` are unnecessary when the variable is unconditionally assigned in the following code. Also drop the unused capture of __dump_process.wait() return value in fini(). Assisted-by: Claude Code (claude-opus-4-6) Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
parent
e86d144705
commit
d85af7219a
1 changed files with 1 additions and 4 deletions
|
|
@ -1178,7 +1178,7 @@ class criu:
|
|||
|
||||
def fini(self):
|
||||
if self.__lazy_migrate:
|
||||
ret = self.__dump_process.wait()
|
||||
self.__dump_process.wait()
|
||||
if self.__lazy_pages_p:
|
||||
ret = self.__lazy_pages_p.wait()
|
||||
grep_errors(os.path.join(self.__ddir(), "lazy-pages.log"), err=ret)
|
||||
|
|
@ -1360,7 +1360,6 @@ class criu:
|
|||
if not os.access(self.__stats_file("dump"), os.R_OK):
|
||||
return
|
||||
|
||||
stats_written = -1
|
||||
with open(self.__stats_file("dump"), 'rb') as stfile:
|
||||
stats = crpc.images.load(stfile)
|
||||
stent = stats['entries'][0]['dump']
|
||||
|
|
@ -2223,8 +2222,6 @@ class Launcher:
|
|||
self.wait()
|
||||
|
||||
def __wait_one(self, flags):
|
||||
pid = -1
|
||||
status = -1
|
||||
signal.alarm(10)
|
||||
while True:
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue