about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2025-04-22 19:42:07 +0300
committerBonfaceKilz2025-04-22 19:47:14 +0300
commit709bad0f2d76707c949ba2757c50ddd2554e4c40 (patch)
treeed669a4df31f67c390aef36e0bd901131dd2ad60
parentfd5bde91f0c4f72d355fed338af6c1a60a43bdcc (diff)
downloadgenenetwork3-709bad0f2d76707c949ba2757c50ddd2554e4c40.tar.gz
Correctly ignore broad-expection-raised exceptions.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rw-r--r--gn3/commands.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gn3/commands.py b/gn3/commands.py
index ee3e32b..3598e2f 100644
--- a/gn3/commands.py
+++ b/gn3/commands.py
@@ -90,8 +90,9 @@ def compose_pcorrs_command(
             return "pearsons"
         if "spearmans" in mthd:
             return "spearmans"
+        # pylint: disable=[broad-exception-raised]
         raise Exception(
-            f"Invalid method '{method}'")  # pylint: disable=[broad-exception-raised]
+            f"Invalid method '{method}'")
 
     prefix_cmd = (
         f"{sys.executable}", "-m", "scripts.partial_correlations",
@@ -105,8 +106,9 @@ def compose_pcorrs_command(
             kwargs.get("target_database") is None
             and kwargs.get("target_traits") is not None):
         return compose_pcorrs_command_for_selected_traits(prefix_cmd, **kwargs)
+    # pylint: disable=[broad-exception-raised]
     raise Exception(
-        "Invalid state: I don't know what command to generate!")  # pylint: disable=[broad-exception-raised]
+        "Invalid state: I don't know what command to generate!")
 
 
 def queue_cmd(conn: Redis,