Remove six
The repo does not support python2 anymore, remove usage of python2/3 compatability library. Change-Id: Ifa95482b219bcf143762e9328c4200f1ffc772be
This commit is contained in:
parent
944a6187c7
commit
098dbcbae4
|
@ -13,12 +13,11 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import configparser
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from launchpadlib import launchpad
|
from launchpadlib import launchpad
|
||||||
import six
|
|
||||||
from six.moves import configparser
|
|
||||||
|
|
||||||
from gerrit_dash_creator.cmd import creator
|
from gerrit_dash_creator.cmd import creator
|
||||||
|
|
||||||
|
@ -71,7 +70,7 @@ def review_id_from_bug(bug, project_name):
|
||||||
reviews_ignored = set()
|
reviews_ignored = set()
|
||||||
for msg in bug.bug.messages:
|
for msg in bug.bug.messages:
|
||||||
try:
|
try:
|
||||||
lines = six.text_type(msg.content).split('\n')
|
lines = str(msg.content).split('\n')
|
||||||
except UnicodeEncodeError:
|
except UnicodeEncodeError:
|
||||||
print('non-ascii in bug %s' % bug.web_link)
|
print('non-ascii in bug %s' % bug.web_link)
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -13,14 +13,14 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import configparser
|
||||||
|
import io
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import sys
|
import sys
|
||||||
|
from urllib import parse as urllib_parse
|
||||||
|
|
||||||
import jinja2
|
import jinja2
|
||||||
import six
|
|
||||||
from six.moves import configparser
|
|
||||||
from six.moves.urllib import parse as urllib_parse
|
|
||||||
|
|
||||||
|
|
||||||
def escape(buff):
|
def escape(buff):
|
||||||
|
@ -128,7 +128,7 @@ def load_template(template_file=None, template_directory=None,
|
||||||
|
|
||||||
def get_configuration(dashboard):
|
def get_configuration(dashboard):
|
||||||
"""Returns the configuration of a dashboard as string."""
|
"""Returns the configuration of a dashboard as string."""
|
||||||
configuration = six.StringIO()
|
configuration = io.StringIO()
|
||||||
dashboard.write(configuration)
|
dashboard.write(configuration)
|
||||||
result = configuration.getvalue()
|
result = configuration.getvalue()
|
||||||
configuration.close()
|
configuration.close()
|
||||||
|
|
|
@ -4,5 +4,4 @@
|
||||||
|
|
||||||
jinja2
|
jinja2
|
||||||
pbr>=1.6
|
pbr>=1.6
|
||||||
six>=1.9.0
|
|
||||||
simplejson>=2.2.0
|
simplejson>=2.2.0
|
||||||
|
|
Loading…
Reference in New Issue