def config_file_opt(self, path2json):
        if os.path.exists(path2json):
            with codecs.open(opt.config, 'r', encoding='ascii') as f:
                json_con = json_loads(f.read())
            self.server = self.server or json_con.get('server', None)
            self.password = self.password or json_con.get('password', None)
            self.server_port = self.server_port or json_con.get('server_port', None)
            self.local_port = self.local_port or json_con.get('local_port', None)
            self.method = self.method or json_con.get('method', 'table')
            self.timeout = self.timeout or json_con.get('timeout', None)
            self.debug = self.debug or json_con.get('debug', False)
        else:
            logger.warning("the json file path `%s` is not exists" % path2json)
dataset/ETHPy150Open whiteclover/Fukei/fukei/config.py/Config.config_file_opt/original