1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

StringIO compat

This commit is contained in:
Ross McFarland
2019-07-29 08:43:58 -07:00
parent a9d0eef3ba
commit 9e4c120c3e
4 changed files with 13 additions and 3 deletions

10
octodns/compat.py Normal file
View File

@@ -0,0 +1,10 @@
#
# Python 2/3 compat bits
#
try: # pragma: no cover
from StringIO import StringIO
except ImportError: # pragma: no cover
from io import StringIO
StringIO

View File

@@ -5,11 +5,11 @@
from __future__ import absolute_import, division, print_function, \ from __future__ import absolute_import, division, print_function, \
unicode_literals unicode_literals
from StringIO import StringIO
from logging import DEBUG, ERROR, INFO, WARN, getLogger from logging import DEBUG, ERROR, INFO, WARN, getLogger
from sys import stdout from sys import stdout
from six import text_type from six import text_type
from ..compat import StringIO
class UnsafePlan(Exception): class UnsafePlan(Exception):

View File

@@ -5,11 +5,11 @@
from __future__ import absolute_import, division, print_function, \ from __future__ import absolute_import, division, print_function, \
unicode_literals unicode_literals
from StringIO import StringIO
from logging import getLogger from logging import getLogger
from six import text_type from six import text_type
from unittest import TestCase from unittest import TestCase
from octodns.compat import StringIO
from octodns.provider.plan import Plan, PlanHtml, PlanLogger, PlanMarkdown from octodns.provider.plan import Plan, PlanHtml, PlanLogger, PlanMarkdown
from octodns.record import Create, Delete, Record, Update from octodns.record import Create, Delete, Record, Update
from octodns.zone import Zone from octodns.zone import Zone

View File

@@ -5,10 +5,10 @@
from __future__ import absolute_import, division, print_function, \ from __future__ import absolute_import, division, print_function, \
unicode_literals unicode_literals
from StringIO import StringIO
from unittest import TestCase from unittest import TestCase
from yaml.constructor import ConstructorError from yaml.constructor import ConstructorError
from octodns.compat import StringIO
from octodns.yaml import safe_dump, safe_load from octodns.yaml import safe_dump, safe_load