Skip to content

Commit

Permalink
Don't capture all warnings in database module
Browse files Browse the repository at this point in the history
Closes #337
  • Loading branch information
angus-g committed Aug 5, 2024
1 parent 94dbe1e commit c8851a5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cosima_cookbook/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
from .database_utils import *
from .date_utils import format_datetime

logging.captureWarnings(True)

__DB_VERSION__ = 3
__DEFAULT_DB__ = "/g/data/ik11/databases/cosima_master.db"

Expand Down Expand Up @@ -731,7 +729,8 @@ def find_files(searchdir, matchstring="*.nc", followsymlinks=False):
)
if proc.returncode != 0:
warnings.warn(
"Some files or directories could not be read while finding output files: %s",
"Some files or directories could not be read "
f"while finding output files: {proc.stderr[:200]}",
UserWarning,
)

Expand Down

0 comments on commit c8851a5

Please sign in to comment.