summaryrefslogtreecommitdiff
path: root/oslo_rootwrap/daemon.py
diff options
context:
space:
mode:
authorwangzihao <wangzihao@yovole.com>2020-09-30 14:44:52 +0800
committerwangzihao <wangzihao@yovole.com>2020-09-30 16:34:20 +0800
commit81352d08e90ff9949322374a4930d29ec102124c (patch)
treebb4821b4ff3ffccd63753142831e9de65473c692 /oslo_rootwrap/daemon.py
parentb98693c7086a4e1cfc9dd2000d098a82c2111efd (diff)
downloadoslo-rootwrap-81352d08e90ff9949322374a4930d29ec102124c.tar.gz
Remove six.PY3
The Python 2.7 Support has been dropped since Ussuri. So remove hacking rules for compatibility between python 2 and 3. Change-Id: Idd6a1efd1857a70fc7d960b365bfc58d6cbe00d3
Diffstat (limited to 'oslo_rootwrap/daemon.py')
-rw-r--r--oslo_rootwrap/daemon.py8
1 files changed, 3 insertions, 5 deletions
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