diff options
| author | 2014-10-21 10:33:17 -0300 | |
|---|---|---|
| committer | 2014-10-21 10:33:17 -0300 | |
| commit | 2d14c4b384c7000e264674a92b16e010a510ac05 (patch) | |
| tree | 7676db09f338e46e053170b1c9f7594120b9d434 /nikola/plugins/compile/rest/listing.py | |
| parent | 2d2e97ac540c94e15ac5eccc7d32f3dfb3eea1bc (diff) | |
| parent | 5ec02211214350ee558fd9f6bb052264fd24f75e (diff) | |
Merge tag 'upstream/7.1.0'
Upstream version 7.1.0
Diffstat (limited to 'nikola/plugins/compile/rest/listing.py')
| -rw-r--r-- | nikola/plugins/compile/rest/listing.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nikola/plugins/compile/rest/listing.py b/nikola/plugins/compile/rest/listing.py index 18a1807..23ec254 100644 --- a/nikola/plugins/compile/rest/listing.py +++ b/nikola/plugins/compile/rest/listing.py @@ -29,7 +29,7 @@ from __future__ import unicode_literals -from codecs import open as codecs_open # for patching purposes +import io import os try: from urlparse import urlunsplit @@ -111,7 +111,7 @@ class Listing(Include): self.options['code'] = lang if 'linenos' in self.options: self.options['number-lines'] = self.options['linenos'] - with codecs_open(fpath, 'rb+', 'utf8') as fileobject: + with io.open(fpath, 'r+', encoding='utf8') as fileobject: self.content = fileobject.read().splitlines() self.state.document.settings.record_dependencies.add(fpath) target = urlunsplit(("link", 'listing', fname, '', '')) |
