Skip to content

Commit

Permalink
fixed bad parsing in F7T_FILESYSTEMS
Browse files Browse the repository at this point in the history
  • Loading branch information
jdorsch committed Feb 29, 2024
1 parent e90892a commit 523ade8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/status/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,20 @@
from jaeger_client import Config
import opentracing

app = Flask(__name__)
logger = setup_logging(logging, 'status')

AUTH_HEADER_NAME = os.environ.get("F7T_AUTH_HEADER_NAME","Authorization")

SYSTEMS_PUBLIC = os.environ.get("F7T_SYSTEMS_PUBLIC").strip('\'"').split(";")

FILESYSTEMS = ast.literal_eval(os.environ.get("F7T_FILESYSTEMS", {}))
try:
FILESYSTEMS = ast.literal_eval(os.environ.get("F7T_FILESYSTEMS", {}).strip('\'"'))
except Exception as e:
app.logger.error(e)
app.logger.error("Error parsing F7T_FILESYSTEMS env var. Filesystems information will not be available")
app.logger.error(f"Current value: F7T_FILESYSTEMS={os.environ.get('F7T_FILESYSTEMS')}")
FILESYSTEMS = {}

SERVICES = os.environ.get("F7T_STATUS_SERVICES").strip('\'"').split(";") # ; separated service names
SYSTEMS = os.environ.get("F7T_STATUS_SYSTEMS").strip('\'"').split(";") # ; separated systems names
Expand Down Expand Up @@ -53,9 +61,7 @@
# debug on console
DEBUG_MODE = get_boolean_var(os.environ.get("F7T_DEBUG_MODE", False))

app = Flask(__name__)

logger = setup_logging(logging, 'status')

JAEGER_AGENT = os.environ.get("F7T_JAEGER_AGENT", "").strip('\'"')
if JAEGER_AGENT != "":
Expand Down

0 comments on commit 523ade8

Please sign in to comment.