14 lines
459 B
Python
14 lines
459 B
Python
import os
|
|
import sys
|
|
|
|
def check_environment() -> None:
|
|
"""
|
|
This function checks if required environment variables are set. It prints
|
|
problem resolution guide and exits using `sys.exit(1)` on problem.
|
|
"""
|
|
if "MAB_SERVER" not in os.environ:
|
|
print("Please set `MAB_SERVER` environment variable!")
|
|
sys.exit(1)
|
|
if "MAB_USER" not in os.environ:
|
|
print("Please set `MAB_USER` environment variable!")
|
|
sys.exit(1) |