def configure_telemetry(args):
    if (args.command == 'install-certificate'):
        _Globals.telemetry = TelemetryDisabled()
        return
    if (args.command == 'self-update'):
        _Globals.telemetry = TelemetryDisabled()
        return
    if args.needs_repo:
        try:
            update_user_data()
        except BMOAPIError as err:
            logger.debug('BMOAPIErrori: %s', err)
            _Globals.telemetry = TelemetryDisabled()
            return
    if ((not config.telemetry_enabled) or (not user_data.is_data_collected)):
        _Globals.telemetry = TelemetryDisabled()
        return
    _Globals.telemetry = Telemetry()
    telemetry().set_metrics(args)
def configure_telemetry(args):
    if (args.command == 'install-certificate'):
        _Globals.telemetry = TelemetryDisabled()
        return
    if (args.command == 'self-update'):
        _Globals.telemetry = TelemetryDisabled()
        return
    if args.needs_repo:
        try:
            update_user_data()
        except BMOAPIError as err:
            logger.debug('BMOAPIErrori: %s', err)
            _Globals.telemetry = TelemetryDisabled()
            return
    if ((not config.telemetry_enabled) or (not user_data.is_data_collected)):
        _Globals.telemetry = TelemetryDisabled()
        return
    _Globals.telemetry = Telemetry()
    telemetry().set_metrics(args)