mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-29 09:23:11 +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)
|
os.unlink(outfile)
|
||||||
if infile_temp:
|
if infile_temp:
|
||||||
os.unlink(infile_temp)
|
os.unlink(infile_temp)
|
||||||
except:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
return im
|
return im
|
||||||
|
|
|
@ -518,7 +518,7 @@ def _save_netpbm(im, fp, filename):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
os.unlink(file)
|
os.unlink(file)
|
||||||
except:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -179,7 +179,7 @@ class IptcImageFile(ImageFile.ImageFile):
|
||||||
finally:
|
finally:
|
||||||
try:
|
try:
|
||||||
os.unlink(outfile)
|
os.unlink(outfile)
|
||||||
except:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -379,7 +379,7 @@ class JpegImageFile(ImageFile.ImageFile):
|
||||||
finally:
|
finally:
|
||||||
try:
|
try:
|
||||||
os.unlink(path)
|
os.unlink(path)
|
||||||
except:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
self.mode = self.im.mode
|
self.mode = self.im.mode
|
||||||
|
@ -699,7 +699,7 @@ def _save_cjpeg(im, fp, filename):
|
||||||
subprocess.check_call(["cjpeg", "-outfile", filename, tempfile])
|
subprocess.check_call(["cjpeg", "-outfile", filename, tempfile])
|
||||||
try:
|
try:
|
||||||
os.unlink(tempfile)
|
os.unlink(tempfile)
|
||||||
except:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user