diff --git a/newsfragments/3739.bugfix b/newsfragments/3739.bugfix new file mode 100644 index 000000000..875941cf8 --- /dev/null +++ b/newsfragments/3739.bugfix @@ -0,0 +1 @@ +Fixed annoying UnicodeWarning message on Python 2 when running CLI tools. \ No newline at end of file diff --git a/src/allmydata/scripts/runner.py b/src/allmydata/scripts/runner.py index 43a3b8807..7f7f88bf6 100644 --- a/src/allmydata/scripts/runner.py +++ b/src/allmydata/scripts/runner.py @@ -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')