NR: No service information and service disambiguation aren't errors
This commit is contained in:
parent
92fa4c02b0
commit
9669f6d058
1 changed files with 2 additions and 2 deletions
|
@ -144,10 +144,10 @@ class Module(object):
|
|||
query = client.service.QueryServices(service_id, datetime.utcnow().date().isoformat(),
|
||||
datetime.utcnow().time().strftime("%H:%M:%S+0000"))
|
||||
if not query:
|
||||
event["stderr"].write("No service information is available for this identifier.")
|
||||
event["stdout"].write("No service information is available for this identifier.")
|
||||
return
|
||||
if len(query["serviceList"][0]) > 1:
|
||||
event["stderr"].write("Headcode refers to multiple services: " +
|
||||
event["stdout"].write("Identifier refers to multiple services: " +
|
||||
", ".join(["%s (%s->%s)" % (a["rid"], a["originCrs"], a["destinationCrs"]) for a in query["serviceList"][0]]))
|
||||
return
|
||||
rid = query["serviceList"][0][0]["rid"]
|
||||
|
|
Loading…
Reference in a new issue