aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2009-03-12 23:49:00 -0400
committerWaylan Limberg <waylan@gmail.com>2009-03-12 23:49:00 -0400
commit07b03afa103b2baf86a2f77f2eab5aa92f81375f (patch)
treec142d402a9c548d156e115c9dc18559f1ece78a9
parent047d4d4aa84af470de41bb164c94ec90e7c725bb (diff)
downloadmarkdown-07b03afa103b2baf86a2f77f2eab5aa92f81375f.tar.gz
markdown-07b03afa103b2baf86a2f77f2eab5aa92f81375f.tar.bz2
markdown-07b03afa103b2baf86a2f77f2eab5aa92f81375f.zip
Slight change to convertFromFile - better checking of type of output (filename or file-like-object).
-rw-r--r--markdown/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/markdown/__init__.py b/markdown/__init__.py
index 31ab29c..2b5231a 100644
--- a/markdown/__init__.py
+++ b/markdown/__init__.py
@@ -432,7 +432,7 @@ class Markdown:
html = self.convert(text)
# Write to file or stdout
- if type(output) == type("string"):
+ if isinstance(output, (str, unicode)):
output_file = codecs.open(output, "w", encoding=encoding)
output_file.write(html)
output_file.close()