summaryrefslogtreecommitdiffstats
path: root/nikola/PyRSS2Gen.py
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2012-12-12 20:15:48 -0300
committerLibravatarAgustin Henze <tin@sluc.org.ar>2012-12-12 20:15:48 -0300
commit0f2c04e70a0ffdd0892d6970cafbcd952d221db5 (patch)
treed36f7747c4b9cb5c5e00cae5b137d22214b1c7be /nikola/PyRSS2Gen.py
parentca1f5a392261a7c6b82b5ac1015427605909d8c9 (diff)
Imported Upstream version 5upstream/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()