Skip to content

Commit

Permalink
#109 allow log file creation to create the output directory if specif…
Browse files Browse the repository at this point in the history
…ied by the user but not already existing.

Bump devel version number for debug checking
  • Loading branch information
bch0w committed Apr 10, 2023
1 parent e67a2d8 commit 01492f5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pysep-adjtomo"
version = "0.3.3"
version = "0.3.4"
description = "Python Seismogram Extraction and Processing"
readme = "README.md"
requires-python = ">=3.7"
Expand Down
4 changes: 2 additions & 2 deletions pysep/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging

__version__ = "0.3.3"
__version__ = "0.3.4"

logger = logging.getLogger("pysep")
logger.setLevel("INFO")
Expand All @@ -14,4 +14,4 @@
# from pysep.pysep import Pysep, get_data # NOQA
from pysep.pysep import Pysep, get_data # NOQA
from pysep.recsec import RecordSection, plotw_rs # NOQA
from pysep.declust import Declust # NOQA
from pysep.declust import Declust # NOQA
5 changes: 5 additions & 0 deletions pysep/pysep.py
Original file line number Diff line number Diff line change
Expand Up @@ -1773,6 +1773,11 @@ def _set_log_file(self, mode):

if not save_log:
return

import pdb;pdb.set_trace()
# Make the output directory that the log file will be saved in
if not os.path.exists(self._output_dir):
os.makedirs(self._output_dir)

if mode == 0:
fh = logging.FileHandler(initial_log_path)
Expand Down

0 comments on commit 01492f5

Please sign in to comment.