aboutsummaryrefslogtreecommitdiffstats
path: root/nikola/PyRSS2Gen.py
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2012-12-12 20:15:50 -0300
committerLibravatarAgustin Henze <tin@sluc.org.ar>2012-12-12 20:15:50 -0300
commit540e6aa6fcd86a98e270715d1d4e49493eacc270 (patch)
treead1b1fcca82d9638f5edcf7a4d9149ca113ba2d2 /nikola/PyRSS2Gen.py
parent25744f4bf462020e353c503db3ec558604c19137 (diff)
parent0f2c04e70a0ffdd0892d6970cafbcd952d221db5 (diff)
Merge tag 'upstream/5'
Upstream version 5
Diffstat (limited to 'nikola/PyRSS2Gen.py')
-rw-r--r--nikola/PyRSS2Gen.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/nikola/PyRSS2Gen.py b/nikola/PyRSS2Gen.py
index 6c4bda3..198ebb5 100644
--- a/nikola/PyRSS2Gen.py
+++ b/nikola/PyRSS2Gen.py
@@ -1,5 +1,7 @@
"""PyRSS2Gen - A Python library for generating RSS 2.0 feeds."""
+# flake8: noqa
+
__name__ = "PyRSS2Gen"
__version__ = (1, 0, 0)
__author__ = "Andrew Dalke <dalke@dalkescientific.com>"
@@ -7,11 +9,7 @@ __author__ = "Andrew Dalke <dalke@dalkescientific.com>"
_generator_name = __name__ + "-" + ".".join(map(str, __version__))
import datetime
-try:
- import cStringIO
- StringIO = cStringIO
-except ImportError:
- import StringIO
+import io
# Could make this the base class; will need to add 'publish'
class WriteXmlMixin:
@@ -23,7 +21,7 @@ class WriteXmlMixin:
handler.endDocument()
def to_xml(self, encoding = "iso-8859-1"):
- f = StringIO.StringIO()
+ f = io.StringIO()
self.write_xml(f, encoding)
return f.getvalue()