def set_config(key, value):
 if value.isdigit():
  value = int(value)
 elif (value.lower() == 'true'):
  value = True
 elif (value.lower() == 'false'):
  value = False
 c[key] = value
 path = ((os.path.expanduser('~') + os.sep) + '.rainbow_config.json')
 data = {}
 try:
  data = load_config(path)
 except:
  return
 if (key in data):
  fixup(data, key, value)
 else:
  data[key] = value
 with open(path, 'w') as out:
  json.dump(data, out, indent=4)
 os.system(('chmod 777 ' + path))

def set_config ( key , value ) : if value . isdigit ( ) : value = int ( value ) elif ( value . lower ( ) == 'true' ) : value = True elif ( value . lower ( ) == 'false' ) : value = False c [ key ] = value path = ( ( os . path . expanduser ( '~' ) + os . sep ) + '.rainbow_config.json' ) data = { } try : data = load_config ( path ) except : return if ( key in data ) : fixup ( data , key , value ) else : data [ key ] = value with open ( path , 'w' ) as out : json . dump ( data , out , indent = 4 ) os . system ( ( 'chmod 777 ' + path ) )
set the value of a traffic server configuration variable .