diff options
| author | Stefan Behnel <stefan_ml@behnel.de> | 2017-08-17 22:38:03 +0200 |
|---|---|---|
| committer | Stefan Behnel <stefan_ml@behnel.de> | 2017-08-17 22:38:03 +0200 |
| commit | 86cd63d60f4ace24afdb4f09f48825c6f312b30f (patch) | |
| tree | 8e5c6a51fd681426a595bf3aafe1108e61505f6c /src/lxml/tests | |
| parent | f9df1b8d45f04b72c2b96f508d649843cf58d15a (diff) | |
| download | python-lxml-86cd63d60f4ace24afdb4f09f48825c6f312b30f.tar.gz | |
Py2.6 fix
Diffstat (limited to 'src/lxml/tests')
| -rw-r--r-- | src/lxml/tests/test_xslt.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lxml/tests/test_xslt.py b/src/lxml/tests/test_xslt.py index 1aef75b0..87f2e193 100644 --- a/src/lxml/tests/test_xslt.py +++ b/src/lxml/tests/test_xslt.py @@ -244,7 +244,7 @@ class ETreeXSLTTestCase(HelperTestCase): res[0].write_output(f.name, compression=9) finally: f.close() - with gzip.GzipFile(f.name) as f: + with contextlib.closing(gzip.GzipFile(f.name)) as f: res[0] = f.read().decode("UTF-16").replace('\n', '') finally: os.unlink(f.name) |
