def __init__()

in lethingaccesssdk/thing_access.py [0:0]


    def __init__(self, config=None):
        '''
        构造函数,使用设备的指定的ProductKey和DeviceName
        '''
        self._ThingAccess = leda_handler
        if config is not None and isinstance(config, dict):
            if "productKey" in config and "deviceName" in config:
                self.pk = config["productKey"]
                self.dn = config["deviceName"]
            else:
                logging.error("config is error")
                self.pk = None
                self.dn = None
        else:
            logging.error("can't init ThingAccessClient, parameter is error")
            self.pk = None
            self.dn = None
        self.device = None