Skip to content

Commit 02a0b80

Browse files
chaenweb-flow
authored andcommitted
sweep: #5953 Take into account pep-515 for Request names
1 parent 3a510bc commit 02a0b80

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/DIRAC/RequestManagementSystem/scripts/dirac_rms_request.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,14 @@ def main():
206206
for reqID in requests:
207207
# We allow reqID to be the requestName if it is unique
208208
try:
209+
# PEP-515 allows for underscore in numerical literals
210+
# So a request name 00123_00456
211+
# is interpreted as a requestID 12300456
212+
if not reqID.isdigit():
213+
raise ValueError()
214+
209215
requestID = int(reqID)
210-
except ValueError:
216+
except (ValueError, TypeError):
211217
requestID = reqClient.getRequestIDForName(reqID)
212218
if not requestID["OK"]:
213219
gLogger.notice(requestID["Message"])

0 commit comments

Comments
 (0)