Skip to content

Commit

Permalink
remove custom log message editing (closes #1545)
Browse files Browse the repository at this point in the history
  • Loading branch information
petrelharp committed Apr 5, 2024
1 parent 6926072 commit e2a8f5d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions stdpopsim/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import pathlib
import shutil
import os
import re
import inspect

import msprime
Expand Down Expand Up @@ -55,11 +54,6 @@ class CLIFormatter(logging.Formatter):
# DEBUG: Write out debug messages for the user/developer.
def format(self, record):
if record.name == "py.warnings":
# trim the ugly warnings.warn message
match = re.search(
r"Warning:\s*(.*?)\s*warnings.warn\(", record.args[0], re.DOTALL
)
record.args = (match.group(1),)
self._style = logging.PercentStyle("WARNING: %(message)s")
else:
if record.levelno == logging.WARNING:
Expand Down

0 comments on commit e2a8f5d

Please sign in to comment.