diff options
author | Petr Viktorin <pviktori@redhat.com> | 2015-09-14 14:52:48 +0200 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2015-10-07 10:27:20 +0200 |
commit | 65e3b9edc66d7dfe885df143c16a59588af8192f (patch) | |
tree | e31db5202fea377210f56488e77af65fd0e4c908 /daemons | |
parent | 026b1b5307939e6a75ec4866e21cd420733370cb (diff) | |
download | freeipa-65e3b9edc66d7dfe885df143c16a59588af8192f.tar.gz freeipa-65e3b9edc66d7dfe885df143c16a59588af8192f.tar.xz freeipa-65e3b9edc66d7dfe885df143c16a59588af8192f.zip |
Use six.Stringio instead of StringIO.StringIO
The StringIO class was moved to the io module.
(In Python 2, io.StringIO is available, but is Unicode-only.)
Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'daemons')
-rw-r--r-- | daemons/ipa-otpd/test.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/daemons/ipa-otpd/test.py b/daemons/ipa-otpd/test.py index 824f8a292..0ccd8b0e4 100644 --- a/daemons/ipa-otpd/test.py +++ b/daemons/ipa-otpd/test.py @@ -20,11 +20,12 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -import StringIO import struct import subprocess import sys +from six import StringIO + try: from pyrad import packet from pyrad.dictionary import Dictionary @@ -40,7 +41,7 @@ ATTRIBUTE User-Password 2 string ATTRIBUTE NAS-Identifier 32 string """ -dct = Dictionary(StringIO.StringIO(DICTIONARY)) +dct = Dictionary(StringIO(DICTIONARY)) proc = subprocess.Popen(["./ipa-otpd", sys.argv[1]], stdin=subprocess.PIPE, stdout=subprocess.PIPE) |