Skip to content

Commit

Permalink
Merge pull request #309 from phenobarbital/pluggable-logger
Browse files Browse the repository at this point in the history
allow overriding an environment
  • Loading branch information
phenobarbital authored Aug 24, 2023
2 parents b9f48e2 + 8d1ad0c commit dc727ed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions navconfig/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,12 @@ def addFiles(self, files):
"""
self._ini.read(files)

def addEnv(self, file):
def addEnv(self, file, override: bool = False):
if file.exists() and file.is_file():
try:
load_dotenv(
dotenv_path=file,
override=False
override=override
)
except Exception as err:
raise NavConfigError(str(err)) from err
Expand Down
2 changes: 1 addition & 1 deletion navconfig/readers/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,5 @@ def setex(self, key, value, timeout):
def close(self):
try:
self._redis.close()
except Exception as err: # pylint: disable=W0703
except Exception as err: # pylint: disable=W0703
logging.error(err)
2 changes: 1 addition & 1 deletion navconfig/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
__title__ = 'navconfig'
__description__ = ('Configuration tool for all Navigator Services '
'Tool for accessing Config info from different sources.')
__version__ = '1.3.6'
__version__ = '1.3.7'
__author__ = 'Jesus Lara'
__author_email__ = '[email protected]'
__license__ = 'MIT'

0 comments on commit dc727ed

Please sign in to comment.