From 1b9f6ca005aa2dd1c383a766da3d05a5ff1a8c2f Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Fri, 6 May 2011 01:25:34 +0200 Subject: [PATCH] formats may be unicode, not byte-string --- lib/matplotlib/sphinxext/plot_directive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/sphinxext/plot_directive.py b/lib/matplotlib/sphinxext/plot_directive.py index 917f6e7578cd..8b31d08d9e3c 100644 --- a/lib/matplotlib/sphinxext/plot_directive.py +++ b/lib/matplotlib/sphinxext/plot_directive.py @@ -238,7 +238,7 @@ def plot_directive(name, arguments, options, content, lineno, Handle the plot directive. """ formats = setup.config.plot_formats - if type(formats) == str: + if isinstance(formats, basestring): formats = eval(formats) # The user may provide a filename *or* Python code content, but not both