Skip to content

Commit

Permalink
Fixed issue where anonymizer would log confusing error when targeting…
Browse files Browse the repository at this point in the history
… anonymized script
  • Loading branch information
fireundubh committed Jan 17, 2020
1 parent 1d29479 commit 5a0d9c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyro/Anonymizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5a0d9c1

Please sign in to comment.