We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9d5b88 commit 7cd40d8Copy full SHA for 7cd40d8
monailabel/main.py
@@ -325,9 +325,15 @@ def start_server_init_settings(self, args):
325
logger.debug(" ENV VARIABLES/SETTINGS ")
326
logger.debug("**********************************************************")
327
for k, v in settings.dict().items():
328
- v = json.dumps(v) if isinstance(v, list) or isinstance(v, dict) else str(v)
+ if isinstance(v, list) or isinstance(v, dict):
329
+ v = json.dumps(v)
330
+ elif v is not None:
331
+ v = str(v)
332
+ else:
333
+ v = None
334
logger.debug(f"{'set' if any(platform.win32_ver()) else 'export'} {k}={v}")
- os.environ[k] = v
335
+ if v is not None:
336
+ os.environ[k] = v
337
338
logger.debug("")
339
0 commit comments