From 5a0d9c1302dfb356153eac8de7d25cec05b48192 Mon Sep 17 00:00:00 2001 From: fireundubh Date: Fri, 17 Jan 2020 01:09:40 -0800 Subject: [PATCH] Fixed issue where anonymizer would log confusing error when targeting anonymized script --- pyro/Anonymizer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyro/Anonymizer.py b/pyro/Anonymizer.py index 0137a4e2..08b0ad7c 100644 --- a/pyro/Anonymizer.py +++ b/pyro/Anonymizer.py @@ -30,6 +30,10 @@ def anonymize_script(path: str) -> None: user_name: str = header.user_name.value computer_name: str = header.computer_name.value + if '.' not in file_path: + Anonymizer.log.warning(f'Cannot anonymize script again: "{path}"') + return + if not file_path.casefold().endswith('.psc'): Anonymizer.log.warning(f'Cannot anonymize script due to invalid file extension: "{path}"') return