diff options
author | Waylan Limberg <waylan@gmail.com> | 2009-03-12 23:49:00 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2009-03-12 23:49:00 -0400 |
commit | 07b03afa103b2baf86a2f77f2eab5aa92f81375f (patch) | |
tree | c142d402a9c548d156e115c9dc18559f1ece78a9 | |
parent | 047d4d4aa84af470de41bb164c94ec90e7c725bb (diff) | |
download | markdown-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__.py | 2 |
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() |