Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
388c6302cb
2 changed files with 6 additions and 2 deletions
|
|
@ -49,6 +49,7 @@ DDRESCUE_SETTINGS = {
|
||||||
'--timeout': {'Selected': False, 'Value': '30m', },
|
'--timeout': {'Selected': False, 'Value': '30m', },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
DRIVE_POWEROFF_TIMEOUT = 90
|
||||||
PARTITION_TYPES = {
|
PARTITION_TYPES = {
|
||||||
'GPT': {
|
'GPT': {
|
||||||
'NTFS': 'EBD0A0A2-B9E5-4433-87C0-68B6B72699C7', # Basic Data Partition
|
'NTFS': 'EBD0A0A2-B9E5-4433-87C0-68B6B72699C7', # Basic Data Partition
|
||||||
|
|
|
||||||
|
|
@ -1959,7 +1959,7 @@ def run_ddrescue(state, block_pair, pass_name, settings, dry_run=True):
|
||||||
std.clear_screen()
|
std.clear_screen()
|
||||||
warning_message = ''
|
warning_message = ''
|
||||||
|
|
||||||
def _poweroff_source_drive(idle_minutes=120):
|
def _poweroff_source_drive(idle_minutes):
|
||||||
"""Power off source drive after a while."""
|
"""Power off source drive after a while."""
|
||||||
source_dev = state.source.path.name
|
source_dev = state.source.path.name
|
||||||
|
|
||||||
|
|
@ -2063,7 +2063,10 @@ def run_ddrescue(state, block_pair, pass_name, settings, dry_run=True):
|
||||||
# Check result
|
# Check result
|
||||||
if proc.poll():
|
if proc.poll():
|
||||||
# True if return code is non-zero (poll() returns None if still running)
|
# True if return code is non-zero (poll() returns None if still running)
|
||||||
poweroff_thread = exe.start_thread(_poweroff_source_drive)
|
poweroff_thread = exe.start_thread(
|
||||||
|
_poweroff_source_drive,
|
||||||
|
cfg.ddrescue.DRIVE_POWEROFF_TIMEOUT,
|
||||||
|
)
|
||||||
warning_message = 'Error(s) encountered, see message above'
|
warning_message = 'Error(s) encountered, see message above'
|
||||||
state.update_top_panes()
|
state.update_top_panes()
|
||||||
if warning_message:
|
if warning_message:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue