mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Replaced flush try except with hasattr
This commit is contained in:
parent
8d3b240096
commit
384d32969d
|
@ -397,10 +397,8 @@ def _save(im, fp, filename, save_all=False):
|
|||
|
||||
fp.write(b";") # end of file
|
||||
|
||||
try:
|
||||
if hasattr(fp, "flush"):
|
||||
fp.flush()
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
def get_interlace(im):
|
||||
|
|
Loading…
Reference in New Issue
Block a user