Skip to content

Commit

Permalink
Send warning to STDERR #2071
Browse files Browse the repository at this point in the history
  • Loading branch information
isbluis committed Aug 8, 2023
1 parent 5307a30 commit 43de357
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/ARAX/ARAXQuery/Expand/smartapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
import requests_cache
import json
import re
import sys
from functools import lru_cache

def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs)

class SmartAPI:
"""SmartAPI."""

Expand Down Expand Up @@ -110,7 +113,7 @@ def get_trapi_endpoints(self, version=None, whitelist=None, blacklist=None):

servers = []
if "servers" not in hit:
print(f"No 'servers' element found in {title}!")
eprint(f"No 'servers' element found in {title}!")
continue
for server in hit["servers"]:
try:
Expand Down

0 comments on commit 43de357

Please sign in to comment.