Skip to content

Commit

Permalink
no need to read from env var in this way
Browse files Browse the repository at this point in the history
  • Loading branch information
honnix committed Aug 28, 2019
1 parent ae57c6e commit 1151680
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions flytekit/configuration/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,12 @@ class FlyteConfigurationFile(object):

def __init__(self, location=None):
"""
This singleton is initialized on module load with empty location. It'll attempt to use the env var to load
config at that time. If pyflyte is called with a config flag, it'll reload the singleton with the passed
config path.
This singleton is initialized on module load with empty location. If pyflyte is called with
a config flag, it'll reload the singleton with the passed config path.
:param Text location: used to load config from this location. If location is None, it'll attempt to use
FLYTE_INTERNAL_CONFIGURATION_PATH env var.
:param Text location: used to load config from this location.
"""
# Can't use internal module here to get env var name to avoid circular dependency.
self._location = location or _os.environ.get("FLYTE_INTERNAL_CONFIGURATION_PATH")
self._location = location
self._config = None

def _load_config(self):
Expand Down

0 comments on commit 1151680

Please sign in to comment.