Open ddrescueview only once per BlockPair
This commit is contained in:
parent
6880a353cc
commit
fc8f81b66d
1 changed files with 3 additions and 2 deletions
|
|
@ -146,6 +146,7 @@ class BlockPair():
|
|||
'scrape': 'Pending',
|
||||
})
|
||||
self.view_map = 'DISPLAY' in os.environ or 'WAYLAND_DISPLAY' in os.environ
|
||||
self.view_proc = None
|
||||
|
||||
# Set map path
|
||||
# e.g. '(Clone|Image)_Model[_p#]_Size[_Label].map'
|
||||
|
|
@ -2088,8 +2089,8 @@ def run_ddrescue(state, block_pair, pass_name, settings, dry_run=True):
|
|||
|
||||
# Start ddrescue and ddrescueview (if enabled)
|
||||
proc = exe.popen_program(cmd)
|
||||
if block_pair.view_map:
|
||||
exe.popen_program(
|
||||
if block_pair.view_map and not block_pair.view_proc:
|
||||
block_pair.view_proc = exe.popen_program(
|
||||
['ddrescueview', '-r', '5s', block_pair.map_path],
|
||||
pipe=True,
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue