Skip to content

Commit 5cd949a

Browse files
committed
read ESO_TAP_URL from env var; otherwise use the config one
1 parent aa8d821 commit 5cd949a

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

astroquery/eso/core.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,9 @@ def __init__(self):
9494
self.USE_DEV_TAP = True
9595

9696
def tap_url(self) -> str:
97-
url = conf.tap_url
98-
if self.USE_DEV_TAP:
99-
try:
100-
url = os.environ['TAP_URL']
101-
except KeyError as e:
102-
raise KeyError(
103-
"Running on dev mode, but TAP_URL environment variable is not set"
104-
) from e
105-
logmsg = f"Using dev tap url: {url}"
106-
log.info(logmsg)
97+
url = os.environ.get('ESO_TAP_URL', conf.tap_url)
98+
logmsg = f"Using tap_url = {url}"
99+
log.info(logmsg)
107100
return url
108101

109102
def _authenticate(self, *, username: str, password: str) -> bool:

0 commit comments

Comments
 (0)