Skip to content

Commit 6822c87

Browse files
author
James William Pye
committed
StringIO is now in io.
1 parent ffffba7 commit 6822c87

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

postgresql/test/test_configfile.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@
33
# http://python.projects.postgresql.org
44
##
55
import unittest
6-
import postgresql.configfile as configfile
7-
8-
try:
9-
from cStringIO import StringIO
10-
except ImportError:
11-
from StringIO import StringIO
6+
from io import StringIO
7+
from .. import configfile
128

139
sample_config_Aroma = \
1410
"""
@@ -232,7 +228,7 @@ def testSelection(self):
232228
# Test a simple selector
233229
red = configfile.read_config(['foo = bar\n', 'bar = foo'],
234230
selector = lambda x: x == 'bar')
235-
rkeys = red.keys()
231+
rkeys = list(red.keys())
236232
self.failUnless(len(rkeys) == 1)
237233
self.failUnless(rkeys[0] == 'bar')
238234
self.failUnless(red['bar'] == 'foo')

0 commit comments

Comments
 (0)