Prevent crash when retrying recovery
* IMO ddrescue was exiting too quickly to load the map data so I'll assume 0b
This commit is contained in:
parent
bd47f08996
commit
d35dba7539
1 changed files with 1 additions and 1 deletions
|
|
@ -163,7 +163,7 @@ class BlockPair():
|
||||||
"""Update progress using map file."""
|
"""Update progress using map file."""
|
||||||
if os.path.exists(self.map_path):
|
if os.path.exists(self.map_path):
|
||||||
map_data = read_map_file(self.map_path)
|
map_data = read_map_file(self.map_path)
|
||||||
self.rescued_percent = map_data['rescued']
|
self.rescued_percent = map_data.get('rescued', 0)
|
||||||
self.rescued = (self.rescued_percent * self.size) / 100
|
self.rescued = (self.rescued_percent * self.size) / 100
|
||||||
self.status[pass_num] = get_formatted_status(
|
self.status[pass_num] = get_formatted_status(
|
||||||
label='Pass {}'.format(pass_num+1),
|
label='Pass {}'.format(pass_num+1),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue