it's always PY3

This commit is contained in:
Jean-Paul Calderone 2022-11-30 13:32:10 -05:00
parent 46c996c662
commit a47ec5acef
1 changed files with 4 additions and 5 deletions

View File

@ -33,8 +33,7 @@ del patch
#
# Also note that BytesWarnings only happen if Python is run with -b option, so
# in practice this should only affect tests.
if PY3:
import warnings
# Error on BytesWarnings, to catch things like str(b""), but only for
# allmydata code.
warnings.filterwarnings("error", category=BytesWarning, module=".*allmydata.*")
import warnings
# Error on BytesWarnings, to catch things like str(b""), but only for
# allmydata code.
warnings.filterwarnings("error", category=BytesWarning, module=".*allmydata.*")