Skip to content

Commit

Permalink
Merge branch 'main' into log_courant
Browse files Browse the repository at this point in the history
  • Loading branch information
jshipton authored Aug 24, 2023
2 parents dbfd35f + 543d67f commit 8ba94cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.0.4.3)
activesupport (7.0.7.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand Down Expand Up @@ -86,7 +86,7 @@ GEM
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.8.0)
i18n (1.12.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
jekyll (3.9.3)
addressable (~> 2.4)
Expand Down Expand Up @@ -209,7 +209,7 @@ GEM
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.18.0)
minitest (5.19.0)
nokogiri (1.14.3-x86_64-linux)
racc (~> 1.4)
octokit (4.25.1)
Expand Down
6 changes: 5 additions & 1 deletion gusto/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,11 @@ def update_logfile_location(new_path, comm):
fh = fh[0]
logger.debug("Closing temporary logger and moving logfile")
old_path = Path(fh.baseFilename)
filename = Path(old_path.name.removeprefix("temp-"))
# str.removeprefix unavailable for python version <3.9
filename_str = old_path.name
if filename_str.startswith("temp-"):
filename_str = filename_str[5:]
filename = Path(filename_str)
fh.flush()
fh.close()
logger.removeHandler(fh)
Expand Down

0 comments on commit 8ba94cf

Please sign in to comment.