Browse Source

StringIO compat

pull/384/head
Ross McFarland 6 years ago
parent
commit
9e4c120c3e
No known key found for this signature in database GPG Key ID: 61C10C4FC8FE4A89
4 changed files with 13 additions and 3 deletions
  1. +10
    -0
      octodns/compat.py
  2. +1
    -1
      octodns/provider/plan.py
  3. +1
    -1
      tests/test_octodns_plan.py
  4. +1
    -1
      tests/test_octodns_yaml.py

+ 10
- 0
octodns/compat.py 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

+ 1
- 1
octodns/provider/plan.py View File

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


+ 1
- 1
tests/test_octodns_plan.py View File

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


+ 1
- 1
tests/test_octodns_yaml.py View File

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


Loading…
Cancel
Save