replace except: with except Exception:

This commit is contained in:
Michael Poluektov
2024-08-14 13:38:19 +01:00
parent 0ec1f9e331
commit 6f72def1ac
16 changed files with 71 additions and 71 deletions
+5 -5
View File
@@ -122,7 +122,7 @@ class FunctionsTable:
function = db.get(Function, id)
return FunctionModel.model_validate(function)
except:
except Exception:
return None
def get_functions(self, active_only=False) -> List[FunctionModel]:
@@ -198,7 +198,7 @@ class FunctionsTable:
db.commit()
db.refresh(function)
return self.get_function_by_id(id)
except:
except Exception:
return None
def get_user_valves_by_id_and_user_id(
@@ -256,7 +256,7 @@ class FunctionsTable:
)
db.commit()
return self.get_function_by_id(id)
except:
except Exception:
return None
def deactivate_all_functions(self) -> Optional[bool]:
@@ -271,7 +271,7 @@ class FunctionsTable:
)
db.commit()
return True
except:
except Exception:
return None
def delete_function_by_id(self, id: str) -> bool:
@@ -281,7 +281,7 @@ class FunctionsTable:
db.commit()
return True
except:
except Exception:
return False