Skip to content
Snippets Groups Projects
Commit 6fb92e8f authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Fix E722 do not use bare except

parent 651b4181
No related branches found
No related tags found
2 merge requests!147Merge previous default branch feat-cod-rmq into main,!105Fix linting
......@@ -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))
......
......@@ -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))
......
......@@ -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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment