File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,14 @@ def __init__(self, line: str) -> None:
9797 super ().__init__ (errmsg )
9898
9999
100+ class CondorQError (ChildProcessError ):
101+ """Raised when executing the 'condor_q' command fails."""
102+
103+ def __init__ (self ) -> None :
104+ errmsg = "Checking htcondor status (condor_q) failed"
105+ super ().__init__ (errmsg )
106+
107+
100108# ----- HTCondor Querying / Processing ----- #
101109
102110
@@ -113,15 +121,19 @@ def query_condor_q() -> str:
113121 str
114122 The utf-8 decoded string returned by the
115123 ``condor_q`` command.
124+
125+ Raises
126+ ------
127+ CondorQError
128+ If the ``condor_q`` command fails for any reason.
116129 """
117130 return_code , raw_result = CommandLine .run ("condor_q" )
118131 condor_status = raw_result .decode ().strip ()
119132 if return_code == 0 :
120133 return condor_status
121134
122135 # An issue occured, let's raise
123- msg = "Checking htcondor status failed"
124- raise ChildProcessError (msg )
136+ raise CondorQError ()
125137
126138
127139def read_condor_q (report : str ) -> tuple [list [HTCTaskSummary ], ClusterSummary ]:
You can’t perform that action at this time.
0 commit comments