You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a few wrong "raise" statement in control/state.py. They have no exception parameter which is only valid when we are in except clause with an active exception:
diff --git a/control/state.py b/control/state.py
index e76fa4d..db93e49 100644
--- a/control/state.py
+++ b/control/state.py
@@ -456,7 +456,7 @@ class OmapGatewayState(GatewayState):
def _add_key(self, key: str, val: str):
"""Adds key and value to the OMAP."""
if not self.ioctx:
- raise
+ raise RuntimeError("Can't add key when Rados is closed")
try:
version_update = self.version + 1
@@ -483,7 +483,7 @@ class OmapGatewayState(GatewayState):
def _remove_key(self, key: str):
"""Removes key from the OMAP."""
if not self.ioctx:
- raise
+ raise RuntimeError("Can't remove key when Rados is closed")
try:
version_update = self.version + 1
@@ -510,7 +510,7 @@ class OmapGatewayState(GatewayState):
def delete_state(self):
"""Deletes OMAP object contents."""
if not self.ioctx:
- raise
+ raise RuntimeError("Can't delete state when Rados is closed")
try:
with rados.WriteOpCtx() as write_op:
The text was updated successfully, but these errors were encountered:
We have a few wrong "raise" statement in control/state.py. They have no exception parameter which is only valid when we are in except clause with an active exception:
The text was updated successfully, but these errors were encountered: