Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def read_beakerx_env_settings():
args = []
settings = json.loads(EnvironmentSettings.read_setting_from_file())
beakerx_settings = settings['beakerx']
if 'jvm_options' in beakerx_settings:
jvm_settings = beakerx_settings['jvm_options']
for x in jvm_settings['other']:
args.append(x)
for x in jvm_settings['properties']:
name = x.get('name')
value = x.get('value')
value = '-D' + name + '=' + value
args.append(value)
if 'heap_GB' in jvm_settings and jvm_settings['heap_GB']:
val = float(jvm_settings['heap_GB'])
if val.is_integer():
value = '-Xmx' + str(int(val)) + 'g'
def _read_property():
return EnvironmentSettings.read_setting_from_file()