Merge pull request #1086 from tahoe-lafs/3739.annoying-warning-python-2

Get rid of annoying warning in CLI tools

Fixes ticket:3739
This commit is contained in:
Itamar Turner-Trauring 2021-06-15 16:46:29 -04:00 committed by GitHub
commit f39eeb4741
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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')