mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't require six
This commit is contained in:
parent
a27ed35dee
commit
7b2c1ce272
1 changed files with 10 additions and 4 deletions
14
noxfile.py
14
noxfile.py
|
@ -12,6 +12,13 @@ import os
|
|||
import sys
|
||||
import json
|
||||
import pprint
|
||||
try:
|
||||
# Python 2
|
||||
from StringIO import StringIO
|
||||
except ImportError:
|
||||
# Python 3
|
||||
import io
|
||||
StringIO = io.StringIO
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@ -20,19 +27,18 @@ if __name__ == '__main__':
|
|||
exit(1)
|
||||
|
||||
# Import 3rd-party libs
|
||||
import six
|
||||
import nox
|
||||
from nox.command import CommandFailed
|
||||
|
||||
|
||||
# ----- Helper Classes ---------------------------------------------------------------------------------------------->
|
||||
class StdStream(six.StringIO):
|
||||
class StdStream(StringIO):
|
||||
def __init__(self, std):
|
||||
super(StdStream, self).__init__()
|
||||
StringIO.__init__(self)
|
||||
self._std = std
|
||||
|
||||
def write(self, data):
|
||||
super(StdStream, self).write(data)
|
||||
StringIO.write(self, data)
|
||||
self._std.write(data)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue