diff options
| author | Bob Halley <halley@dnspython.org> | 2014-08-31 16:59:30 -0700 |
|---|---|---|
| committer | Bob Halley <halley@dnspython.org> | 2014-08-31 16:59:30 -0700 |
| commit | f94224d330ee4204eb9cd6a3225e7f08787cf614 (patch) | |
| tree | 9ee1b42e3f55fe7e2b3a3f11d711146fa247b683 | |
| parent | 764960c84c47e62252337292dabcc20c1feaf28b (diff) | |
| download | dnspython-f94224d330ee4204eb9cd6a3225e7f08787cf614.tar.gz | |
Fix some issues with dns.zone.to_file().
| -rw-r--r-- | dns/zone.py | 2 | ||||
| -rw-r--r-- | tests/zone.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/dns/zone.py b/dns/zone.py index c1b0223..a5f4f9c 100644 --- a/dns/zone.py +++ b/dns/zone.py @@ -507,7 +507,7 @@ class Zone(object): LF on POSIX, CRLF on Windows, CR on Macintosh). @type nl: string or None """ - temp_buffer = io.StringIO() + temp_buffer = io.BytesIO() self.to_file(temp_buffer, sorted, relativize, nl) return_value = temp_buffer.getvalue() temp_buffer.close() diff --git a/tests/zone.py b/tests/zone.py index a134609..61f4148 100644 --- a/tests/zone.py +++ b/tests/zone.py @@ -133,7 +133,7 @@ class ZoneTestCase(unittest.TestCase): finally: if not _keep_output: os.unlink('example3.out') - self.failUnless(ok) + self.assertTrue(ok) def testFromText(self): z = dns.zone.from_text(example_text, 'example.', relativize=True) |
