Skip to content

Commit

Permalink
fix to satisfy pyright
Browse files Browse the repository at this point in the history
  • Loading branch information
felix5572 committed May 27, 2024
1 parent 65ec8b8 commit 3725aee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dpdispatcher/dlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
dlog = logging.getLogger("dpdispatcher")
dlog.propagate = False
dlog.setLevel(logging.INFO)
cwd_logfile_path = os.path.join(os.getcwd(), "dpdispatcher.log")
dlogf = logging.FileHandler(cwd_logfile_path, delay=True)
try:
cwd_logfile_path = os.path.join(os.getcwd(), "dpdispatcher.log")
dlogf = logging.FileHandler(cwd_logfile_path, delay=True)
dlog.addHandler(dlogf)
dlog.info(f"LOG INIT:dpdispatcher log direct to {cwd_logfile_path}")
except PermissionError:
Expand Down

0 comments on commit 3725aee

Please sign in to comment.