Get rid of annoying warning.

This commit is contained in:
Itamar Turner-Trauring 2021-06-15 13:56:34 -04:00
parent 95a7bfe57a
commit 3461665ccf
2 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1 @@
Fixed annoying UnicodeWarning message on Python 2 when running CLI tools.

View File

@ -204,7 +204,8 @@ def _setup_coverage(reactor):
"""
# can we put this _setup_coverage call after we hit
# argument-parsing?
if '--coverage' not in sys.argv:
# ensure_str() only necessary on Python 2.
if six.ensure_str('--coverage') not in sys.argv:
return
sys.argv.remove('--coverage')