summaryrefslogtreecommitdiffabout
path: root/wiki2texi.py
Side-by-side diff
Diffstat (limited to 'wiki2texi.py') (more/less context) (ignore whitespace changes)
-rw-r--r--wiki2texi.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/wiki2texi.py b/wiki2texi.py
index a7b5e92..6e32c56 100644
--- a/wiki2texi.py
+++ b/wiki2texi.py
@@ -16,7 +16,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from wikimarkup import *
-from types import TupleType
from wikins import wiki_ns_re, wiki_ns
import re
import urllib
@@ -58,13 +57,13 @@ class TexiWikiMarkup (WikiMarkup):
def __init__(self, *args, **keywords):
super(TexiWikiMarkup, self).__init__(*args, **keywords)
- if keywords.has_key("sectioning-model"):
+ if "sectioning-model" in keywords:
val = keywords["sectioning-model"]
- if self.sectcomm.has_key(val):
+ if val in self.sectcomm:
self.sectioning_model = val
else:
raise ValueError("Invalid value for sectioning model: %s" % val)
- if keywords.has_key("sectioning-start"):
+ if "sectioning-start" in keywords:
val = keywords["sectioning-start"]
if val < 0 or val > 4:
raise ValueError("Invalid value for sectioning start: %s" % val)
@@ -217,7 +216,7 @@ class TexiWikiMarkup (WikiMarkup):
# FIXME: A very crude version
arg = self.format(elt['content'][0])
if len(elt['content']) > 1:
- s = map(self.format, elt['content'])
+ s = [x for x in map(self.format, elt['content'])]
text = s[1]
else:
s = None

Return to:

Send suggestions and report system problems to the System administrator.