Skip to content

Commit

Permalink
Merge pull request #80 from erikhalt/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
dotchetter authored Dec 22, 2023
2 parents 39d658e + ec73cc4 commit f6c4a78
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion pyttman/core/internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ def depr_graceful(message: str, version: str):
out = f"{message} - This was deprecated in version {version}."
warnings.warn(out, DeprecationWarning)

class CustomUserDict(UserDict):

def __init__(self, dictionary):
self.data = dictionary
self.__dict__.update(dictionary)

class Settings:
"""
Dataclass holding settings configured in the settings.py
Expand Down Expand Up @@ -85,7 +91,7 @@ def __repr__(self):

@staticmethod
def _dict_to_object(dictionary):
return json.loads(json.dumps(dictionary), object_hook=Settings)
return json.loads(json.dumps(dictionary), object_hook=CustomUserDict)

def _generate_name(name):
"""
Expand Down
2 changes: 1 addition & 1 deletion pyttman/tools/pyttmancli/terraforming.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def bootstrap_app(module: str = None, devmode: bool = False,
logging_format = logging.BASIC_FORMAT

logging_handle.setFormatter(logging.Formatter(logging_format))
logger = logging.getLogger("Pyttman logger")
logger = logging.getLogger(f"Pyttman logger on app {app_name}")
logger.setLevel(logging.DEBUG)
logger.addHandler(logging_handle)

Expand Down

0 comments on commit f6c4a78

Please sign in to comment.