From: <mi...@us...> - 2010-01-08 08:59:12
|
Author: milde Date: 2010-01-08 09:59:01 +0100 (Fri, 08 Jan 2010) New Revision: 6216 Modified: trunk/docutils/HISTORY.txt trunk/docutils/docutils/utils.py Log: Fix [ 2923723 ] let decode_path() tolerate path == None Modified: trunk/docutils/HISTORY.txt =================================================================== --- trunk/docutils/HISTORY.txt 2010-01-07 19:02:20 UTC (rev 6215) +++ trunk/docutils/HISTORY.txt 2010-01-08 08:59:01 UTC (rev 6216) @@ -26,6 +26,10 @@ - FileInput opens files as text files with universal newline support (mode "rU", configurable with the new optional argument "mode"). +* docutils/utils.py + + - Fix [ 2923723 ] let decode_path() tolerate path == None + * docutils/writers/latex2e/__init__.py - Use `transforms.writer_aux.Admonitions` to "normalize" special Modified: trunk/docutils/docutils/utils.py =================================================================== --- trunk/docutils/docutils/utils.py 2010-01-07 19:02:20 UTC (rev 6215) +++ trunk/docutils/docutils/utils.py 2010-01-08 08:59:01 UTC (rev 6216) @@ -343,6 +343,8 @@ # see also http://article.gmane.org/gmane.text.docutils.user/2905 try: path = path.decode(sys.getfilesystemencoding(), 'strict') + except AttributeError: # default value None has no decode method + return nodes.reprunicode(path) except UnicodeDecodeError: path = path.decode('utf-8', 'strict') try: |