Skip to content

Commit

Permalink
Merge pull request #46 from lsst-sqre/u/ajt/fix-missing-logconfig
Browse files Browse the repository at this point in the history
Fix: logging config relative path changed in two-python model.
  • Loading branch information
athornton committed Jun 17, 2024
2 parents 4ae877e + 624cce0 commit 82f0bcb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- Delete the sections that don't apply -->

### Bug fixes

- In two-python model, relative location of logging source changed; accomodate either.
11 changes: 8 additions & 3 deletions src/lsst/rsp/startup/services/labrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,14 @@ def _copy_logging_profile(self) -> None:
if not pdir.is_dir():
pdir.mkdir(parents=True)
jl_path = get_jupyterlab_config_dir()
user_profile.write_bytes(
(jl_path / "etc" / "20-logging.py").read_bytes()
)
srcfile = jl_path / "etc" / "20-logging.py"
# Location changed with two-python container. Try each.
if not srcfile.is_file():
srcfile = jl_path / "20-logging.py"
if not srcfile.is_file():
self._logger.warning("Could not find source user log profile.")
return
user_profile.write_bytes(srcfile.read_bytes())

def _copy_dircolors(self) -> None:
self._logger.debug("Copying dircolors if needed")
Expand Down

0 comments on commit 82f0bcb

Please sign in to comment.