def generate_keyfile(csrf_key, session_key):
 output = file_template.safe_substitute(dict(csrf_key=csrf_key, session_key=session_key))
 if os.path.exists(file_path):
  if (options.force is None):
   print "Warning: secret_keys.py file exists.  Use 'generate_keys.py --force' to force overwrite."
  else:
   write_file(output)
 else:
  write_file(output)

def generate_keyfile ( csrf_key , session_key ) : output = file_template . safe_substitute ( dict ( csrf_key = csrf_key , session_key = session_key ) ) if os . path . exists ( file_path ) : if ( options . force is None ) : print "Warning: secret_keys.py file exists.  Use 'generate_keys.py --force' to force overwrite." else : write_file ( output ) else : write_file ( output )
generate random keys for csrf- and session key .