Skip to content

Commit

Permalink
Move an exception hook into a logger function
Browse files Browse the repository at this point in the history
  • Loading branch information
ekatef committed Oct 28, 2023
1 parent b75b1eb commit a4dbf5a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions scripts/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def create_logger(logger_name, level=logging.INFO):
logger.setLevel(level)
handler = logging.StreamHandler(stream=sys.stdout)
logger.addHandler(handler)
sys.excepthook = handle_exception


def read_osm_config(*args):
Expand Down
1 change: 0 additions & 1 deletion scripts/build_shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
sets_path_to_root("pypsa-earth")

create_logger(__name__)
sys.excepthook = handle_exception


def get_GADM_filename(country_code):
Expand Down

0 comments on commit a4dbf5a

Please sign in to comment.