Skip to content

Commit 1a9fd22

Browse files
committed
minor tweak
1 parent b23e110 commit 1a9fd22

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

astroquery/esa/xmm_newton/core.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,10 @@ def download_data(self, observation_id, *, filename=None, verbose=False,
116116
response = self._request('HEAD', link, save=False, cache=cache)
117117

118118
# Get original extension
119-
if 'Content-Type' in response.headers.keys() and 'text' not in response.headers['Content-Type']:
119+
if 'Content-Type' in response.headers and 'text' not in response.headers['Content-Type']:
120120
_, params = cgi.parse_header(response.headers['Content-Disposition'])
121121
else:
122122
error = "Data protected by proprietary rights. Please check your credentials"
123-
log.error(error)
124123
raise LoginError(error)
125124

126125
r_filename = params["filename"]

0 commit comments

Comments
 (0)