Skip to content

Commit

Permalink
import cleanup - cStringIO is not unicode safe
Browse files Browse the repository at this point in the history
  • Loading branch information
leifj committed Nov 29, 2017
1 parent 6eac076 commit f66e229
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 23 deletions.
1 change: 0 additions & 1 deletion src/pyff/i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# -*- coding: utf-8 -*-

import gettext

import cherrypy
import locale
import os
Expand Down
1 change: 0 additions & 1 deletion src/pyff/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import logging
import syslog

import cherrypy

def printable(s):
Expand Down
1 change: 0 additions & 1 deletion src/pyff/md.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import logging
import sys
import traceback

from . import __version__
from .mdrepo import MDRepository
from .pipes import plumbing
Expand Down
1 change: 0 additions & 1 deletion src/pyff/mdrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"""

from __future__ import absolute_import, unicode_literals

from .stats import get_metadata_info
import operator
from lxml import etree
Expand Down
6 changes: 1 addition & 5 deletions src/pyff/mdx.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,8 @@

import pkg_resources

try:
from cStringIO import StringIO
except ImportError: # pragma: no cover
print(" *** install cStringIO for better performance")
from StringIO import StringIO

from StringIO import StringIO
import getopt
import urlparse
from cherrypy.lib.cpstats import StatsPage
Expand Down
6 changes: 1 addition & 5 deletions src/pyff/pipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
"""
import traceback

try:
from cStringIO import StringIO
except ImportError: # pragma: no cover
print(" *** install cStringIO for better performance")
from StringIO import StringIO
from StringIO import StringIO
import os
import yaml
from .utils import resource_string, PyffException
Expand Down
2 changes: 0 additions & 2 deletions src/pyff/samlmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from copy import deepcopy
from .exceptions import *
from StringIO import StringIO
from .utils import dumptree


class EntitySet(object):
Expand Down Expand Up @@ -110,7 +109,6 @@ def parse_saml_metadata(source,
.format(base_url, source, xml_error(ex.error_log, m=base_url)))

if t is not None:
#log.debug(dumptree(t))
if t.tag == "{%s}EntityDescriptor" % NS['md']:
t = entitiesdescriptor([t], base_url, copy=False, validate=True, nsmap=t.nsmap)

Expand Down
8 changes: 1 addition & 7 deletions src/pyff/store.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
try:
from cStringIO import StringIO
except ImportError: # pragma: no cover
print(" *** install cStringIO for better performance")
from StringIO import StringIO

from StringIO import StringIO
import time
from copy import deepcopy

import re
from redis import Redis

from .constants import NS, ATTRS
from .decorators import cached
from .logs import log
Expand Down

0 comments on commit f66e229

Please sign in to comment.