Skip to content

Commit

Permalink
[Configuration ] Add dev_mode_enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
valouvaliavlo authored and Herklos committed Oct 30, 2021
1 parent b7a8072 commit 9c4ae2e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions octobot_commons/configuration/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,3 +289,13 @@ def _get_config_without_profile_elements(self) -> dict:
for profile_managed_element in self.profile.FULLY_MANAGED_ELEMENTS:
filtered_config.pop(profile_managed_element, None)
return filtered_config

def dev_mode_enabled(self) -> bool:
"""
Check if DEV_MODE is enabled
:return: bool
"""
return os.getenv(
commons_constants.CONFIG_DEBUG_OPTION,
self.config.get(commons_constants.CONFIG_DEBUG_OPTION, False),
)

0 comments on commit 9c4ae2e

Please sign in to comment.