aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2013-02-27 04:25:29 -0500
committerWaylan Limberg <waylan@gmail.com>2013-02-27 04:35:23 -0500
commit65058e39365bb3cdf6206c2ace40d1f9af5d2098 (patch)
treed26fdcdc21e79ace55bbf1c943d4b13c81f6aed4
parent794bffb4f168f8429b8d7cb8055af02273ddc547 (diff)
downloadmarkdown-65058e39365bb3cdf6206c2ace40d1f9af5d2098.tar.gz
markdown-65058e39365bb3cdf6206c2ace40d1f9af5d2098.tar.bz2
markdown-65058e39365bb3cdf6206c2ace40d1f9af5d2098.zip
Dict.keys() does not return a list in Python 3.
-rw-r--r--markdown/__init__.py2
-rw-r--r--markdown/extensions/footnotes.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/markdown/__init__.py b/markdown/__init__.py
index 068e966..8872023 100644
--- a/markdown/__init__.py
+++ b/markdown/__init__.py
@@ -241,7 +241,7 @@ class Markdown(object):
try:
self.serializer = self.output_formats[self.output_format]
except KeyError as e:
- valid_formats = self.output_formats.keys()
+ valid_formats = list(self.output_formats.keys())
valid_formats.sort()
message = 'Invalid Output Format: "%s". Use one of %s.' \
% (self.output_format,
diff --git a/markdown/extensions/footnotes.py b/markdown/extensions/footnotes.py
index b7ebc35..131466c 100644
--- a/markdown/extensions/footnotes.py
+++ b/markdown/extensions/footnotes.py
@@ -130,7 +130,7 @@ class FootnoteExtension(Extension):
def makeFootnotesDiv(self, root):
""" Return div of footnotes as et Element. """
- if not self.footnotes.keys():
+ if not list(self.footnotes.keys()):
return None
div = etree.Element("div")