Browse Source

Except OSError instead of IOError

oz123 10 năm trước cách đây
mục cha
commit
cd16c77f2e
3 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 1 1
      pwman/tests/test_base_ui.py
  2. 1 1
      pwman/tests/test_config.py
  3. 1 1
      pwman/tests/test_importer.py

+ 1 - 1
pwman/tests/test_base_ui.py

@@ -53,7 +53,7 @@ class TestBaseUI(unittest.TestCase):
         for item in (testdb, 'foo.csv', 'pwman-export.csv'):
             try:
                 os.unlink(item)
-            except IOError:
+            except OSError:
                 continue
 
     def setUp(self):

+ 1 - 1
pwman/tests/test_config.py

@@ -52,7 +52,7 @@ class TestConfig(unittest.TestCase):
                      'import_file.csv'):
             try:
                 os.unlink(item)
-            except IOError:
+            except OSError:
                 continue
 
     def setUp(self):

+ 1 - 1
pwman/tests/test_importer.py

@@ -42,7 +42,7 @@ class TestImporter(unittest.TestCase):
         for item in ('import_file.csv', 'test-importer.db', 'importdummy.db'):
             try:
                 os.unlink(item)
-            except IOError:
+            except OSError:
                 continue
 
     def setUp(self):