@@ -102,18 +102,11 @@ def download_data(self, observation_id, *, filename=None, verbose=False,
102
102
file format, optional, by default all formats
103
103
values: ASC, ASZ, FTZ, HTM, IND, PDF, PNG
104
104
105
-
106
105
Returns
107
106
-------
108
107
None if not verbose. It downloads the observation indicated
109
108
If verbose returns the filename
110
109
"""
111
- """
112
- Here we change the log level so that it is above 20, this is to stop a log.debug in query.py. this debug
113
- reveals the url being sent which in turn reveals the users username and password
114
- """
115
- previouslevel = log .getEffectiveLevel ()
116
- log .setLevel (21 )
117
110
118
111
# create url to access the aio
119
112
link = self ._create_link (observation_id , ** kwargs )
@@ -134,11 +127,20 @@ def download_data(self, observation_id, *, filename=None, verbose=False,
134
127
# get desired filename
135
128
filename = self ._create_filename (filename , observation_id , suffixes )
136
129
137
- self ._download_file (link , filename , head_safe = True , cache = cache )
130
+ if prop :
131
+ """
132
+ Here we change the log level so that it is above 20, this is to stop a log.debug (line 431) in query.py.
133
+ This debug reveals the url being sent which in turn reveals the users username and password
134
+ """
135
+ previouslevel = log .getEffectiveLevel ()
136
+ log .setLevel (21 )
137
+ self ._download_file (link , filename , head_safe = True , cache = cache )
138
+ log .setLevel (previouslevel )
139
+ else :
140
+ self ._download_file (link , filename , head_safe = True , cache = cache )
138
141
139
142
if verbose :
140
143
log .info (f"Wrote { link } to { filename } " )
141
- log .setLevel (previouslevel )
142
144
143
145
def get_postcard (self , observation_id , * , image_type = "OBS_EPIC" ,
144
146
filename = None , verbose = False ):
0 commit comments