File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -231,15 +231,6 @@ def _get(config, key):
231231 connection_n_retries = int (_get (config , "connection_n_retries" ))
232232 max_retries = int (_get (config , "max_retries" ))
233233
234- if cache_exists :
235- _create_log_handlers ()
236- else :
237- _create_log_handlers (create_file_handler = False )
238- openml_logger .warning (
239- "No permission to create OpenML directory at %s! This can result in OpenML-Python "
240- "not working properly." % config_dir
241- )
242-
243234 cache_directory = os .path .expanduser (short_cache_dir )
244235 # create the cache subdirectory
245236 if not os .path .exists (cache_directory ):
@@ -251,6 +242,15 @@ def _get(config, key):
251242 "OpenML-Python not working properly." % cache_directory
252243 )
253244
245+ if cache_exists :
246+ _create_log_handlers ()
247+ else :
248+ _create_log_handlers (create_file_handler = False )
249+ openml_logger .warning (
250+ "No permission to create OpenML directory at %s! This can result in OpenML-Python "
251+ "not working properly." % config_dir
252+ )
253+
254254 if connection_n_retries > max_retries :
255255 raise ValueError (
256256 "A higher number of retries than {} is not allowed to keep the "
You can’t perform that action at this time.
0 commit comments