[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
ecb0a1f79f
commit
35f1c06f75
@ -103,16 +103,18 @@ def configure_logging(snakemake, skip_handlers=False):
|
||||
}
|
||||
)
|
||||
logging.basicConfig(**kwargs)
|
||||
|
||||
|
||||
# Setup a function to handle uncaught exceptions and include them with their stacktrace into logfiles
|
||||
def handle_exception(exc_type, exc_value, exc_traceback):
|
||||
# Log the exception
|
||||
logger = logging.getLogger()
|
||||
logger.error("Uncaught exception",
|
||||
exc_info=(exc_type, exc_value, exc_traceback))
|
||||
logger.error(
|
||||
"Uncaught exception", exc_info=(exc_type, exc_value, exc_traceback)
|
||||
)
|
||||
|
||||
sys.excepthook = handle_exception
|
||||
|
||||
|
||||
def update_p_nom_max(n):
|
||||
# if extendable carriers (solar/onwind/...) have capacity >= 0,
|
||||
# e.g. existing assets from the OPSD project are included to the network,
|
||||
|
Loading…
Reference in New Issue
Block a user