diff --git a/benchmark/benchmark.py b/benchmark/benchmark.py index 83ec00a..7340166 100644 --- a/benchmark/benchmark.py +++ b/benchmark/benchmark.py @@ -16,7 +16,6 @@ import atexit import math import os -import six import subprocess import sys import timeit @@ -33,9 +32,8 @@ def run_plain(cmd): stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = obj.communicate() - if six.PY3: - out = os.fsdecode(out) - err = os.fsdecode(err) + out = os.fsdecode(out) + err = os.fsdecode(err) return obj.returncode, out, err diff --git a/oslo_rootwrap/daemon.py b/oslo_rootwrap/daemon.py index 61bead0..533ae6d 100644 --- a/oslo_rootwrap/daemon.py +++ b/oslo_rootwrap/daemon.py @@ -19,7 +19,6 @@ from multiprocessing import managers import os import shutil import signal -import six import stat import sys import tempfile @@ -67,12 +66,11 @@ class RootwrapClass(object): ' '.join(userargs)) return cmd.RC_UNAUTHORIZED, "", "" - if six.PY3 and stdin is not None: + if stdin is not None: stdin = os.fsencode(stdin) out, err = obj.communicate(stdin) - if six.PY3: - out = os.fsdecode(out) - err = os.fsdecode(err) + out = os.fsdecode(out) + err = os.fsdecode(err) return obj.returncode, out, err @classmethod diff --git a/oslo_rootwrap/wrapper.py b/oslo_rootwrap/wrapper.py index c454fe2..5a9bc4c 100644 --- a/oslo_rootwrap/wrapper.py +++ b/oslo_rootwrap/wrapper.py @@ -19,7 +19,6 @@ import os import signal import sys -import six from six import moves from oslo_rootwrap import filters @@ -142,7 +141,7 @@ def load_filters(filters_path): filterfilepath = os.path.join(filterdir, filterfile) if not os.path.isfile(filterfilepath): continue - kwargs = {"strict": False} if six.PY3 else {} + kwargs = {"strict": False} filterconfig = moves.configparser.RawConfigParser(**kwargs) filterconfig.read(filterfilepath) for (name, value) in filterconfig.items("Filters"):