Skip to content

Commit

Permalink
Fix false success on check (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
forsyth2 authored Dec 13, 2021
1 parent fb39bbc commit 5b58ed3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/test_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def testCheckKeepTars(self):
)
self.assertEqualOrStop(
output + err,
"INFO: Opening tar archive {}/000000.tar\nINFO: Checking file1.txt\nINFO: Checking file2.txt\nINFO: No failures detected when checking the files.\n".format(
'INFO: Opening tar archive {}/000000.tar\nINFO: Checking file1.txt\nINFO: Checking file2.txt\nINFO: No failures detected when checking the files. If you have a log file, run "grep -i Exception <log-file>" to double check.\n'.format(
self.cache
),
)
Expand Down
10 changes: 8 additions & 2 deletions zstash/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ def extract(keep_files: bool = True):
logger.error(tar)
else:
verb: str = "extracting" if keep_files else "checking"
logger.info("No failures detected when {} the files.".format(verb))
logger.info(
'No failures detected when {} the files. If you have a log file, run "grep -i Exception <log-file>" to double check.'.format(
verb
)
)


def setup_extract() -> Tuple[argparse.Namespace, str]:
Expand Down Expand Up @@ -352,7 +356,9 @@ def multiprocess_extract(
monitor, tars_for_this_worker, failure_queue
)
process: multiprocessing.Process = multiprocessing.Process(
target=extractFiles, args=(matches, keep_files, keep_tars, cache, worker)
target=extractFiles,
args=(matches, keep_files, keep_tars, cache, worker),
daemon=True,
)
process.start()
processes.append(process)
Expand Down

0 comments on commit 5b58ed3

Please sign in to comment.