Exemple #1
0
def load_options(confpath, profile):
    """Load the config file from path"""
    # create the fake args (bypass docopt)
    args = _fake_args()
    args['--cfg'] = confpath
    args['--profile'] = profile
    args['--verbose'] = True
    # and get the options
    o = Options(args=args)
    o.profile = profile
    o.dry = False
    o.safe = True
    o.install_diff = True
    o.import_link = LinkTypes.NOLINK
    o.install_showdiff = True
    o.debug = True
    return o
Exemple #2
0
def load_options(confpath, profile):
    """Load the config file from path"""
    # create the fake args (bypass docopt)
    args = _fake_args()
    args['--cfg'] = confpath
    args['--profile'] = profile
    # and get the options
    # TODO need to patch options
    o = Options(args=args)
    o.profile = profile
    o.dry = False
    o.profile = profile
    o.safe = True
    o.install_diff = True
    o.link = LinkTypes.NOLINK.value
    o.install_showdiff = True
    o.debug = True
    o.compare_dopts = ''
    o.variables = {}
    return o