mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 01:16:16 +03:00
Do not use bare except
This commit is contained in:
parent
aeab86c005
commit
dcf6bc047b
|
@ -31,7 +31,7 @@ class LibTiffTestCase(PillowTestCase):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.assertEqual(im._compression, 'group4')
|
self.assertEqual(im._compression, 'group4')
|
||||||
except:
|
except AttributeError:
|
||||||
print("No _compression")
|
print("No _compression")
|
||||||
print(dir(im))
|
print(dir(im))
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ class TestFileLibTiff(LibTiffTestCase):
|
||||||
for tag in im.tag_v2:
|
for tag in im.tag_v2:
|
||||||
try:
|
try:
|
||||||
del(core_items[tag])
|
del(core_items[tag])
|
||||||
except:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Type codes:
|
# Type codes:
|
||||||
|
|
|
@ -29,7 +29,7 @@ class TestLocale(PillowTestCase):
|
||||||
Image.open(path)
|
Image.open(path)
|
||||||
try:
|
try:
|
||||||
locale.setlocale(locale.LC_ALL, "polish")
|
locale.setlocale(locale.LC_ALL, "polish")
|
||||||
except:
|
except locale.Error:
|
||||||
unittest.skip('Polish locale not available')
|
unittest.skip('Polish locale not available')
|
||||||
Image.open(path)
|
Image.open(path)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user