Skip to content

Commit

Permalink
add/fix: log messages for no premission
Browse files Browse the repository at this point in the history
  • Loading branch information
LennartPurucker committed Oct 14, 2024
1 parent f6ec1bc commit 9b2f392
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions openml/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,10 @@ def _setup(config: _Config | None = None) -> None:
if not config_dir.exists():
config_dir.mkdir(exist_ok=True, parents=True)
except PermissionError:
pass
openml_logger.warning(
f"No permission to create OpenML directory at {config_dir}!"
" This can result in OpenML-Python not working properly."
)

if config is None:
config = _parse_config(config_file)
Expand All @@ -275,8 +278,8 @@ def _setup(config: _Config | None = None) -> None:
_create_log_handlers()
except PermissionError:
openml_logger.warning(
f"No permission to create OpenML directory at {config_dir}! This can result in "
" OpenML-Python not working properly."
f"No permission to create OpenML directory at {_root_cache_directory}!"
" This can result in OpenML-Python not working properly."
)
_create_log_handlers(create_file_handler=False)

Expand Down

0 comments on commit 9b2f392

Please sign in to comment.