@@ -462,7 +462,7 @@ def get_default_date_range(fetch_config):
462462
463463class Configuration (object ):
464464 """
465- Holds the configuration extracted from the command line.
465+ Holds the configuration extracted from the command line + configuration file .
466466
467467 This is usually instantiated by calling :func:`cli`.
468468
@@ -479,7 +479,7 @@ class Configuration(object):
479479 information about a build
480480 """
481481
482- def __init__ (self , options ):
482+ def __init__ (self , options , config ):
483483 self .options = options
484484 self .logger = init_logger (debug = options .debug )
485485 # allow to filter process output based on the user option
@@ -501,6 +501,8 @@ def __init__(self, options):
501501 None if re_ignore_mozversion_line .match (data ["message" ]) else data
502502 )
503503
504+ self .enable_telemetry = config ["enable-telemetry" ] not in ("no" , "false" , 0 )
505+
504506 self .action = None
505507 self .fetch_config = None
506508
@@ -639,7 +641,6 @@ def cli(argv=None, conf_file=DEFAULT_CONF_FNAME, namespace=None):
639641 options = namespace
640642 else :
641643 options = parse_args (argv = argv , defaults = config )
642- options .enable_telemetry = defaults ["enable-telemetry" ] not in ("no" , "false" , 0 )
643644 if not options .cmdargs :
644645 # we don't set the cmdargs default to be that from the
645646 # configuration file, because then any new arguments
@@ -656,4 +657,4 @@ def cli(argv=None, conf_file=DEFAULT_CONF_FNAME, namespace=None):
656657 )
657658 print ("*" * 10 )
658659 print ()
659- return Configuration (options )
660+ return Configuration (options , config )
0 commit comments