Skip to content

Commit a5e78be

Browse files
authored
Merge pull request #1022 from keflavich/alma-cleaner-error
Raise an error when attempting to download private data without first logging in
2 parents c2ba678 + 28ba00f commit a5e78be

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

astroquery/alma/core.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,9 @@ def stage_data(self, uids):
287287
timeout=self.TIMEOUT, cache=False)
288288
self._staging_log['initial_response'] = response
289289
log.debug("First response URL: {0}".format(response.url))
290+
if 'login' in response.url:
291+
raise ValueError("You must login before downloading this data set.")
292+
290293
if response.status_code == 405:
291294
if hasattr(self, '_last_successful_staging_log'):
292295
log.warning("Error 405 received. If you have previously staged "

0 commit comments

Comments
 (0)