Skip to content

Commit 9bc15a1

Browse files
committed
py3
1 parent cfdc035 commit 9bc15a1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

dyndnsc/common/six.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
import sys
77

8+
if sys.version_info < (3, 0):
9+
from cStringIO import StringIO
10+
else:
11+
from io import StringIO
812

913
if sys.version_info < (3, 3):
1014
import IPy as _IPy

dyndnsc/tests/test_conf.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
import configparser
66
except ImportError:
77
import ConfigParser as configparser
8-
try:
9-
from io import StringIO
10-
except ImportError:
11-
from StringIO import StringIO
8+
9+
from dyndnsc.common.six import StringIO
1210

1311
from dyndnsc.conf import getConfiguration, collect_config
1412
from dyndnsc.resources import getFilename, PROFILES_INI

0 commit comments

Comments
 (0)