Skip to content

Commit ea2c414

Browse files
Jorge Fernandez HernandezJorge Fernandez Hernandez
authored andcommitted
GAIAMNGT-1700 The function build_general_output_filename is removed.
1 parent 12efad1 commit ea2c414

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

astroquery/gaia/core.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,12 @@ def load_data(self, ids, *, data_release=None, data_structure='INDIVIDUAL', retr
233233
output_file_specified = False
234234

235235
if not dump_to_file:
236-
output_file = self.build_general_output_filename()
236+
now = datetime.now(timezone.utc)
237+
now_formatted = now.strftime("%Y%m%d_%H%M%S")
238+
temp_dirname = "temp_" + now_formatted
239+
downloadname_formated = "download_" + now_formatted
240+
output_file = os.path.join(os.getcwd(), temp_dirname, downloadname_formated)
241+
237242
else:
238243
output_file = 'datalink_output.zip'
239244
output_file_specified = True
@@ -323,13 +328,6 @@ def load_data(self, ids, *, data_release=None, data_structure='INDIVIDUAL', retr
323328

324329
return files
325330

326-
def build_general_output_filename(self):
327-
now = datetime.now(timezone.utc)
328-
now_formatted = now.strftime("%Y%m%d_%H%M%S")
329-
temp_dirname = "temp_" + now_formatted
330-
downloadname_formated = "download_" + now_formatted
331-
return os.path.join(os.getcwd(), temp_dirname, downloadname_formated)
332-
333331
@staticmethod
334332
def __get_data_files(output_file, path):
335333
files = {}

0 commit comments

Comments
 (0)