| 
25 | 25 | from astropy.table import Table  | 
26 | 26 | from astropy.io import fits  | 
27 | 27 | 
 
  | 
 | 28 | +from . import conf  | 
28 | 29 | from .. import log  | 
29 | 30 | from ..exceptions import InputWarning, LargeQueryWarning, NoResultsWarning, InvalidQueryError  | 
30 | 31 | 
 
  | 
@@ -150,11 +151,6 @@ def __init__(self):  | 
150 | 151 |                     }  | 
151 | 152 |         self._service_api_connection.set_service_params(services, "tesscut")  | 
152 | 153 | 
 
  | 
153 |  | -    def _get_default_timeout(self):  | 
154 |  | -        """ Gets the default request timeout limit. """  | 
155 |  | - | 
156 |  | -        return self._service_api_connection.TIMEOUT  | 
157 |  | - | 
158 | 154 |     def get_sectors(self, *, coordinates=None, radius=0*u.deg, product='SPOC', objectname=None,  | 
159 | 155 |                     moving_target=False, mt_type=None):  | 
160 | 156 | 
 
  | 
@@ -344,7 +340,7 @@ def download_cutouts(self, *, coordinates=None, size=5, sector=None, product='SP  | 
344 | 340 | 
 
  | 
345 | 341 |         # Modify TIMEOUT attribute if necessary (usually this is modified for large requests)  | 
346 | 342 |         if timeout:  | 
347 |  | -            default_timeout = self._get_default_timeout()  | 
 | 343 | +            default_timeout = conf.timeout  | 
348 | 344 |             self._service_api_connection.TIMEOUT = timeout  | 
349 | 345 |             log.info(f"Request timeout upper limit is being changed to {self._service_api_connection.TIMEOUT}"  | 
350 | 346 |                      " seconds.")  | 
@@ -488,7 +484,7 @@ def get_cutouts(self, *, coordinates=None, size=5, product='SPOC', sector=None,  | 
488 | 484 | 
 
  | 
489 | 485 |         # Modify TIMEOUT attribute if necessary (usually this is modified for large requests)  | 
490 | 486 |         if timeout:  | 
491 |  | -            default_timeout = self._get_default_timeout()  | 
 | 487 | +            default_timeout = conf.timeout  | 
492 | 488 |             self._service_api_connection.TIMEOUT = timeout  | 
493 | 489 |             log.info(f"Request timeout upper limit is being changed to {self._service_api_connection.TIMEOUT}"  | 
494 | 490 |                      " seconds.")  | 
 | 
0 commit comments