Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a60b45f

Browse filesBrowse files
committed
Use is_string_like instead of explicitly string or unicode.
svn path=/branches/v0_91_maint/; revision=5191
1 parent f608f7c commit a60b45f
Copy full SHA for a60b45f

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎lib/matplotlib/backends/backend_agg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_agg.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,14 +389,14 @@ def get_default_filetype(self):
389389

390390
def print_raw(self, filename_or_obj, *args, **kwargs):
391391
self.draw()
392-
if type(filename_or_obj) in (str, unicode):
392+
if is_string_like(filename_or_obj):
393393
filename_or_obj = file(filename_or_obj, 'wb')
394394
self.get_renderer()._renderer.write_rgba(filename_or_obj)
395395
print_rgba = print_raw
396396

397397
def print_png(self, filename_or_obj, *args, **kwargs):
398398
self.draw()
399-
if type(filename_or_obj) in (str, unicode):
399+
if is_string_like(filename_or_obj):
400400
filename_or_obj = file(filename_or_obj, 'wb')
401401
self.get_renderer()._renderer.write_png(filename_or_obj,
402402
self.figure.dpi.get())

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.