whoot / Typo3Scan

Enumerate Typo3 version and extensions
GNU General Public License v2.0
170 stars 32 forks source link

Use rawstrings to avoid warnings in Python 3.12 #33

Closed exploide closed 9 months ago

exploide commented 11 months ago

When running Typo3Scan with Python 3.12, it emits several warnings like

SyntaxWarning: invalid escape sequence '\S'

The first commit fixes this by using rawstrings, which are escpecially recommended for regular expressions.

The second commit is another cleanup commit that concerns uses of exit(-1). Exit codes cannot be negative since they are unsigned 8-bit integers, hence must be between 0 and 255. Besides, sys.exit() is recommended over exit().