Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eb5e31a

Browse files
committed
Remove some str() calls not needed on py3
1 parent d815083 commit eb5e31a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/backends/backend_pgf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
try:
4343
# list scalable (non-bitmap) fonts
4444
fc_list = subprocess.check_output(
45-
[str('fc-list'), ':outline,scalable', 'family'])
45+
['fc-list', ':outline,scalable', 'family'])
4646
fc_list = fc_list.decode('utf8')
4747
system_fonts = [f.split(',')[0] for f in fc_list.splitlines()]
4848
system_fonts = list(set(system_fonts))
@@ -175,7 +175,7 @@ def make_pdf_to_png_converter():
175175
# check for pdftocairo
176176
try:
177177
subprocess.check_output(
178-
[str("pdftocairo"), "-v"], stderr=subprocess.STDOUT)
178+
["pdftocairo", "-v"], stderr=subprocess.STDOUT)
179179
tools_available.append("pdftocairo")
180180
except:
181181
pass
@@ -187,7 +187,7 @@ def make_pdf_to_png_converter():
187187
# pick converter
188188
if "pdftocairo" in tools_available:
189189
def cairo_convert(pdffile, pngfile, dpi):
190-
cmd = [str("pdftocairo"), "-singlefile", "-png", "-r", "%d" % dpi,
190+
cmd = ["pdftocairo", "-singlefile", "-png", "-r", "%d" % dpi,
191191
pdffile, os.path.splitext(pngfile)[0]]
192192
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
193193
return cairo_convert

0 commit comments

Comments
 (0)