From: <gr...@us...> - 2012-12-31 13:05:34
|
Revision: 7583 http://docutils.svn.sourceforge.net/docutils/?rev=7583&view=rev Author: grubert Date: 2012-12-31 13:05:27 +0000 (Mon, 31 Dec 2012) Log Message: ----------- Fix: 3598893 --stylesheet and --stylesheet-path options broken, patch partially applied Modified Paths: -------------- trunk/docutils/docutils/frontend.py trunk/docutils/test/test_settings.py Modified: trunk/docutils/docutils/frontend.py =================================================================== --- trunk/docutils/docutils/frontend.py 2012-12-31 12:32:26 UTC (rev 7582) +++ trunk/docutils/docutils/frontend.py 2012-12-31 13:05:27 UTC (rev 7583) @@ -171,13 +171,11 @@ """ # `value` is already a list when given as command line option # and "action" is "append" - # TODO fix here or in buildhtml or process - # buildhtml.py:calls - # values=frontend.Values() - # and later - # optparse _process_args, _process_long_opt - # but then value is NOT unicode but str in python2 - if isinstance(value, unicode): + # in python2 buildhtml.py calls this once with str after several + # times with unicode. MAYBE fix somewhere else. + #if isinstance(value, unicode): #py3 + #if isinstance(value, basestr): # py3 and py2.7 + if not hasattr(value, 'pop'): value = [value] # this function is called for every option added to `value` # -> split the last item and append the result: Modified: trunk/docutils/test/test_settings.py =================================================================== --- trunk/docutils/test/test_settings.py 2012-12-31 12:32:26 UTC (rev 7582) +++ trunk/docutils/test/test_settings.py 2012-12-31 13:05:27 UTC (rev 7583) @@ -213,7 +213,7 @@ (u'a', ['a',] ), (u'a,12', ['a', '12'] ), ([u'a',], ['a',] ), - # TODO ("u'a',", ['a',] ), AttributeError: 'str' object has no attribute 'pop' + ('a,', ['a',] ), # in python3 this is unicode too ) for t in tests: self.assertEqual( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |