Commit 613d4f95 authored by Juliana Oliveira's avatar Juliana Oliveira

{config, main}: adds check_parallel on init

Checks if dill and multiprocess are importable. If they aren't,
Config().parallel flag will be set to false.
Signed-off-by: 's avatarJuliana Oliveira <>
parent 9bf20f0f
......@@ -89,3 +89,9 @@ class Config(object):
self.check_ge("max_diff_block_lines", "max_page_diff_block_lines")
self.check_ge("max_report_size", "max_page_size")
self.check_ge("max_report_size", "max_page_size_child")
def check_parallel(self):
from importlib import util
multiprocess = util.find_spec("multiprocess")
dill = util.find_spec("dill")
self.parallel = (multiprocess and dill)
......@@ -371,6 +371,7 @@ def run_diffoscope(parsed_args):
Config().exclude_commands = parsed_args.exclude_commands
Config().exclude_directory_metadata = parsed_args.exclude_directory_metadata
Config().compute_visual_diffs = PresenterManager().compute_visual_diffs()
tool_prepend_prefix(parsed_args.tool_prefix_binutils, *"ar as ld ld.bfd nm objcopy objdump ranlib readelf strip".split())
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment