Don't show i/o error from attempting to open nonexistent config file.

pull/333/head
Shinji Suzuki 6 years ago
parent 7c82607eb0
commit 06768cb7e5

@ -222,6 +222,8 @@ def perform_strict_detections(iso_cfg_ext_dir, iso_file_list):
def run_contains(filepath, keyword, cfg_dir=iso_cfg_ext_dir):
fullpath = os.path.join(cfg_dir, filepath.replace('/', os.sep))
if not os.path.exists(fullpath):
return False
try:
with open(fullpath, 'rb') as f:
data = f.read().lower()

Loading…
Cancel
Save