Skip to content

Commit

Permalink
Allow dataclasses in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
FriedrichFroebel authored Oct 11, 2023
1 parent 82e2571 commit ab9e55b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pelican/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import logging
import os
import re
import sys
from os.path import isabs

from pelican.log import LimitFilter
Expand All @@ -13,6 +14,7 @@
def load_source(name, path):
spec = importlib.util.spec_from_file_location(name, path)
mod = importlib.util.module_from_spec(spec)
sys.modules[name] = mod
spec.loader.exec_module(mod)
return mod

Expand Down

0 comments on commit ab9e55b

Please sign in to comment.