[OTHER] Catch only Exception, not BaseException

This commit is contained in:
Chris Hennes
2021-02-10 14:09:11 -06:00
committed by wwmayer
parent a7522c384e
commit 6b16e12d7c
18 changed files with 38 additions and 38 deletions

View File

@@ -346,7 +346,7 @@ class TaskPanel(object):
name, info = self.addCustomProperty(self.obj, dialog)
try:
setattr(obj, nam, val)
except:
except Exception:
# this can happen if the old enumeration value doesn't exist anymore
pass
newVal = PathUtil.getPropertyValueString(obj, nam)

View File

@@ -186,7 +186,7 @@ def isValidFileName(filename):
try:
with open(filename, "w") as tempfile:
return True
except:
except Exception:
return False