[OTHER] Catch only Exception, not BaseException
This commit is contained in:
@@ -768,7 +768,7 @@ class SpreadsheetCases(unittest.TestCase):
|
||||
try:
|
||||
sheet.setAlias("A2","Test")
|
||||
self.fail("An ambiguous alias was set which shouldn't be allowed")
|
||||
except:
|
||||
except Exception:
|
||||
self.assertEqual(sheet.getAlias("A2"),None)
|
||||
|
||||
def testClearAlias(self):
|
||||
@@ -783,7 +783,7 @@ class SpreadsheetCases(unittest.TestCase):
|
||||
sheet = self.doc.addObject("Spreadsheet::Sheet","Calc")
|
||||
try:
|
||||
sheet.setAlias("A1","B1")
|
||||
except:
|
||||
except Exception:
|
||||
self.assertEqual(sheet.getAlias("A1"),None)
|
||||
else:
|
||||
self.fail("A cell address was used as alias which shouldn't be allowed")
|
||||
@@ -793,7 +793,7 @@ class SpreadsheetCases(unittest.TestCase):
|
||||
sheet = self.doc.addObject("Spreadsheet::Sheet","Calc")
|
||||
try:
|
||||
sheet.setAlias("A1","mA")
|
||||
except:
|
||||
except Exception:
|
||||
self.assertEqual(sheet.getAlias("A1"), None)
|
||||
else:
|
||||
self.fail("A unit (reserved word) was used as alias which shouldn't be allowed")
|
||||
|
||||
Reference in New Issue
Block a user