(args)
Configure the channels.conf file directly
Configure the channels.conf file directly
Configure the channels . conf file directly
def channel(args):
    """Configure the channels.conf file directly"""
    user_info = read_cfg_file(args.cfg, args.cfg_dir)
    if (user_info is None):
        return

    # Channel configuration file
    if (user_info['setup']['type'] != defs.linux_usb_setup_type):
        raise TypeError("Invalid command for {} receivers".format(
            user_info['setup']['type']))

    chan_file = os.path.join(args.cfg_dir, args.cfg + "-channel.conf")
    _cfg_chan_conf(user_info, chan_file)

    # Overwrite the channels.conf path in case it is changing from a previous
    # version of the CLI when the conf file name was not bound to the cfg name
    user_info['setup']['channel'] = chan_file
    write_cfg_file(args.cfg, args.cfg_dir, user_info)
def channel ( args ) : user_info = read_cfg_file ( args . cfg , args . cfg_dir ) if ( user_info is None ) : return # Channel configuration file if ( user_info [ 'setup' ] [ 'type' ] != defs . linux_usb_setup_type ) : raise TypeError ( "Invalid command for {} receivers" . format ( user_info [ 'setup' ] [ 'type' ] ) ) chan_file = os . path . join ( args . cfg_dir , args . cfg + "-channel.conf" ) _cfg_chan_conf ( user_info , chan_file ) # Overwrite the channels.conf path in case it is changing from a previous # version of the CLI when the conf file name was not bound to the cfg name user_info [ 'setup' ] [ 'channel' ] = chan_file write_cfg_file ( args . cfg , args . cfg_dir , user_info )