Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
2e8d46fa26
1 changed files with 8 additions and 8 deletions
|
|
@ -172,6 +172,12 @@ class BlockPair():
|
||||||
# Set initial status
|
# Set initial status
|
||||||
self.set_initial_status()
|
self.set_initial_status()
|
||||||
|
|
||||||
|
def __getstate__(self):
|
||||||
|
"""Override to allow pickling ddrescue.State() objects."""
|
||||||
|
bp_state = self.__dict__.copy()
|
||||||
|
del bp_state['view_proc']
|
||||||
|
return bp_state
|
||||||
|
|
||||||
def get_error_size(self) -> int:
|
def get_error_size(self) -> int:
|
||||||
"""Get error size in bytes, returns int."""
|
"""Get error size in bytes, returns int."""
|
||||||
return self.size - self.get_rescued_size()
|
return self.size - self.get_rescued_size()
|
||||||
|
|
@ -680,14 +686,6 @@ class State():
|
||||||
cli.clear_screen()
|
cli.clear_screen()
|
||||||
disk_menu = menus.disks()
|
disk_menu = menus.disks()
|
||||||
source_parts = []
|
source_parts = []
|
||||||
|
|
||||||
# Set log
|
|
||||||
log.update_log_path(
|
|
||||||
dest_dir=self.log_dir,
|
|
||||||
dest_name='main',
|
|
||||||
keep_history=True,
|
|
||||||
timestamp=False,
|
|
||||||
)
|
|
||||||
self.ui.set_progress_file(str(self.progress_out))
|
self.ui.set_progress_file(str(self.progress_out))
|
||||||
|
|
||||||
# Set mode
|
# Set mode
|
||||||
|
|
@ -1984,6 +1982,8 @@ def source_or_destination_changed(state) -> bool:
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
"""Main function for ddrescue TUI."""
|
"""Main function for ddrescue TUI."""
|
||||||
args = docopt(DOCSTRING)
|
args = docopt(DOCSTRING)
|
||||||
|
|
||||||
|
# Log setup
|
||||||
log_dir = log.format_log_path()
|
log_dir = log.format_log_path()
|
||||||
log_dir = pathlib.Path(
|
log_dir = pathlib.Path(
|
||||||
f'{log_dir.parent}/'
|
f'{log_dir.parent}/'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue