Skip to content

Commit

Permalink
rpmbuild: don't try to log that logger is not ready yet
Browse files Browse the repository at this point in the history
This causes a recursion error, crashing the whole script

    File "/usr/lib64/python3.12/logging/__init__.py", line 1762, in callHandlers
      hdlr.handle(record)
    File "/usr/lib64/python3.12/logging/__init__.py", line 1700, in handle
      self.callHandlers(record)
    File "/usr/lib64/python3.12/logging/__init__.py", line 1762, in callHandlers
      hdlr.handle(record)
    File "/usr/lib64/python3.12/logging/__init__.py", line 1695, in handle
      maybe_record = self.filter(record)
                     ^^^^^^^^^^^^^^^^^^^
    RecursionError: maximum recursion depth exceeded
  • Loading branch information
FrostyX committed Oct 1, 2024
1 parent 41b8ad9 commit 74c9811
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpmbuild/bin/copr-rpmbuild-log
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _tail_log(config):

for fname in [pidfile, live_log]:
if not os.path.exists(fname):
LOG.warning("File %s doesn't exist, yet", fname)
print("File {0} doesn't exist, yet".format(fname))
return

with open(pidfile, "r") as pidfd:
Expand Down

0 comments on commit 74c9811

Please sign in to comment.