diff --git a/dev_rmq_agents/ohpc_account_create.py b/dev_rmq_agents/ohpc_account_create.py
index 44c8f905557e74fe9cd0030c6799c1ee8ab942c5..5cdabd5e6f0d0905a42abf85f1f92d10835cd145 100644
--- a/dev_rmq_agents/ohpc_account_create.py
+++ b/dev_rmq_agents/ohpc_account_create.py
@@ -20,7 +20,7 @@ def ohpc_account_create(ch, method, properties, body):
         subprocess.call(["sudo", "useradd", username])
         print("[{}]: User {} has been added".format(task, username))
         success = True
-    except:
+    except Exception:
         e = sys.exc_info()[0]
         print("[{}]: Error: {}".format(task, e))
 
diff --git a/dev_rmq_agents/ood_account_create.py b/dev_rmq_agents/ood_account_create.py
index e87124f9490976f863cd16a5f930aa580377987e..de4ed8a8d73d2af39e9fb86c29a0fb17bf83b67f 100644
--- a/dev_rmq_agents/ood_account_create.py
+++ b/dev_rmq_agents/ood_account_create.py
@@ -24,7 +24,7 @@ def ood_account_create(ch, method, properties, body):
         )
         print("[{}]: User {} has been added".format(task, username))
         success = True
-    except:
+    except Exception:
         e = sys.exc_info()[0]
         print("[{}]: Error: {}".format(task, e))
 
diff --git a/dev_rmq_agents/slurm_agent.py b/dev_rmq_agents/slurm_agent.py
index eacc44c92ee61de611c6576cc0642adf6ed7992a..f6c4350c6cad79e010a6a7c576260db201a19bd3 100755
--- a/dev_rmq_agents/slurm_agent.py
+++ b/dev_rmq_agents/slurm_agent.py
@@ -40,7 +40,7 @@ def slurm_account_create(ch, method, properties, body):
         )
         print("SLURM account for user {} has been added".format(username))
         success = True
-    except:
+    except Exception:
         e = sys.exc_info()[0]
         print("[{}]: Error: {}".format(task, e))