def __init__(self, nagcat, conf):
        super(SNMPQuery, self).__init__(nagcat, conf)

        if 'oid' in conf:
            if ("oid_base" in conf or "oid_key" in conf or "key" in conf):
                raise errors.ConfigError(conf,
                        "oid cannot be used with oid_base, oid_key, and key")

            self.conf['oid'] = self.check_oid(conf, 'oid')

            conf['walk'] = False
            self.query_oid = nagcat.new_query(conf, qcls=SNMPCombined)
            self.addDependency(self.query_oid)

        elif ("oid_base" in conf and "oid_key" in conf and "key" in conf):
            if "oid" in conf:
                raise errors.ConfigError(conf,
                        "oid cannot be used with oid_base, oid_key, and key")

            self.conf['oid_base'] = self.check_oid(conf, 'oid_base')
            self.conf['oid_key'] = self.check_oid(conf, 'oid_key')
            self.conf['key'] = conf['key']
            conf['walk'] = True

            base = conf.copy()
            base['oid'] = self.conf['oid_base']
            self.query_base = nagcat.new_query(base, qcls=SNMPCombined)
            self.addDependency(self.query_base)

            key = conf.copy()
            key['oid'] = self.conf['oid_key']
            self.query_key = nagcat.new_query(key, qcls=SNMPCombined)
            self.addDependency(self.query_key)
        else:
            raise errors.ConfigError(conf,
                    "oid or oid_base, oid_key, and key are required")

        if "oid_scale" in conf:
            self.conf['oid_scale'] = self.check_oid(conf, 'oid_scale')
            scale = conf.copy()
            scale['oid'] = self.conf['oid_scale']
            self.query_scale = nagcat.new_query(scale, qcls=SNMPCombined)
            self.addDependency(self.query_scale)
        else:
            self.query_scale = None
dataset/ETHPy150Open marineam/nagcat/python/nagcat/plugins/query_snmp.py/SNMPQuery.__init__/original