Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backend_pgf: fix str/unicode comparison errors #2407

Merged
merged 1 commit into from Sep 10, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/matplotlib/backends/backend_pgf.py
Expand Up @@ -52,10 +52,10 @@ def get_fontspec():
latex_fontspec = []
texcommand = get_texcommand()

if texcommand is not "pdflatex":
if texcommand != "pdflatex":
latex_fontspec.append("\\usepackage{fontspec}")

if texcommand is not "pdflatex" and rcParams.get("pgf.rcfonts", True):
if texcommand != "pdflatex" and rcParams.get("pgf.rcfonts", True):
# try to find fonts from rc parameters
families = ["serif", "sans-serif", "monospace"]
fontspecs = [r"\setmainfont{%s}", r"\setsansfont{%s}",
Expand Down Expand Up @@ -139,7 +139,7 @@ def _font_properties_str(prop):
family = prop.get_family()[0]
if family in families:
commands.append(families[family])
elif family in system_fonts and get_texcommand() is not "pdflatex":
elif family in system_fonts and get_texcommand() != "pdflatex":
commands.append(r"\setmainfont{%s}\rmfamily" % family)
else:
pass # print warning?
Expand Down Expand Up @@ -173,7 +173,7 @@ def make_pdf_to_png_converter():
pass
# check for ghostscript
try:
gs = "gs" if sys.platform is not "win32" else "gswin32c"
gs = "gs" if sys.platform != "win32" else "gswin32c"
check_output([gs, "-v"], stderr=subprocess.STDOUT)
tools_available.append("gs")
except:
Expand Down