Skip to content
Snippets Groups Projects

Dump config file

Merged Theophile GENTILHOMME requested to merge dumpconfig into master
1 file
+ 10
0
Compare changes
  • Side-by-side
  • Inline
+ 10
0
@@ -216,6 +216,16 @@ def mod_to_context(mod):
@@ -216,6 +216,16 @@ def mod_to_context(mod):
def dump_config(params, ctx):
def dump_config(params, ctx):
 
""" Generate configuration file from parameters and context
 
 
Parameters
 
----------
 
params : :any:`list`
 
List of parameters. For example, params attributes of click.Option.
 
ctx : dict
 
Click context dictionary.
 
 
"""
config_file = open(ctx.params.get('dump_config'), 'w')
config_file = open(ctx.params.get('dump_config'), 'w')
logger.debug("Generating configuration file `%s'...", config_file)
logger.debug("Generating configuration file `%s'...", config_file)
config_file.write('## Configuration file automatically generated at %s '
config_file.write('## Configuration file automatically generated at %s '
Loading