Skip to content
This repository was archived by the owner on Dec 5, 2020. It is now read-only.

Commit 19d8129

Browse files
authored
Make backend case-insensitive (#118)
Signed-off-by: wslulciuc <[email protected]>
1 parent 0e60fdc commit 19d8129

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

marquez_client/clients.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ def new_write_only_client():
4343
@staticmethod
4444
def from_env():
4545
backend_env = \
46-
os.environ.get('MARQUEZ_BACKEND', DEFAULT_MARQUEZ_BACKEND)
46+
os.environ.get('MARQUEZ_BACKEND', DEFAULT_MARQUEZ_BACKEND).upper()
4747

48-
if backend_env == 'http':
48+
if backend_env == 'HTTP':
4949
url = os.environ.get('MARQUEZ_URL', DEFAULT_MARQUEZ_URL)
5050
timeout = Utils.to_seconds(
5151
os.environ.get('MARQUEZ_TIMEOUT_MS', DEFAULT_TIMEOUT_MS))
5252
return HttpBackend(url, timeout)
53-
elif backend_env == 'file':
53+
elif backend_env == 'FILE':
5454
file = os.environ.get('MARQUEZ_FILE', DEFAULT_MARQUEZ_FILE)
5555
return FileBackend(file)
56-
elif backend_env == 'log':
56+
elif backend_env == 'LOG':
5757
return LogBackend()

0 commit comments

Comments
 (0)