Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def mk_conf():
global conf_file
if conf_file == defaults_conf or not os.path.exists(_conf_file()):
_mkpath(_conf_file())
with open(_conf_file(), 'w') as f:
conf.write(f)
conf_file = f.name
def print_conf():
"""Print conf file."""
if conf_file == defaults_conf:
print("NO conf file! Using default builtins.")
return
print(("conf file at %s:" % conf_file))
conf.write(sys.stdout)
def print_conf():
if conf_file == defaults_conf:
print("NO conf file! Using default builtins.")
return
print(("conf file at %s:" % conf_file))
conf.write(sys.stdout)
def mk_conf():
"""Create con file."""
global conf_file
if conf_file == defaults_conf or not os.path.exists(_conf_file()):
_mkpath(_conf_file())
with open(_conf_file(), 'w') as f:
conf.write(f)
conf_file = f.name