mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Specified exception type
This commit is contained in:
parent
4ab0cbb5ba
commit
e9a6a96053
|
@ -151,7 +151,7 @@ def Ghostscript(tile, size, fp, scale=1):
|
|||
os.unlink(outfile)
|
||||
if infile_temp:
|
||||
os.unlink(infile_temp)
|
||||
except:
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
return im
|
||||
|
|
|
@ -518,7 +518,7 @@ def _save_netpbm(im, fp, filename):
|
|||
|
||||
try:
|
||||
os.unlink(file)
|
||||
except:
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ class IptcImageFile(ImageFile.ImageFile):
|
|||
finally:
|
||||
try:
|
||||
os.unlink(outfile)
|
||||
except:
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
|
||||
|
|
|
@ -379,7 +379,7 @@ class JpegImageFile(ImageFile.ImageFile):
|
|||
finally:
|
||||
try:
|
||||
os.unlink(path)
|
||||
except:
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
self.mode = self.im.mode
|
||||
|
@ -699,7 +699,7 @@ def _save_cjpeg(im, fp, filename):
|
|||
subprocess.check_call(["cjpeg", "-outfile", filename, tempfile])
|
||||
try:
|
||||
os.unlink(tempfile)
|
||||
except:
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user