Skip to content

Commit

Permalink
UTscapy: treat SyntaxWarning as errors (#4260)
Browse files Browse the repository at this point in the history
  • Loading branch information
gpotter2 committed Feb 5, 2024
1 parent b27081c commit c86d31c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scapy/tools/UTscapy.py
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,9 @@ def main():
logger = logging.getLogger("scapy")
logger.addHandler(logging.StreamHandler())

# Treat SyntaxWarning as errors
warnings.filterwarnings("error", category=SyntaxWarning)

import scapy
print(dash + " UTScapy - Scapy %s - %s" % (
scapy.__version__, sys.version.split(" ")[0]
Expand Down

0 comments on commit c86d31c

Please sign in to comment.