'å€è¿çšrunæ¹æ³'

def run(self):

    try:
        cd = pyclamd.ClamdNetworkSocket(self.IP, 3310)
        if cd.ping():
            self.connstr = (self.IP + '    connection    [OK]')
            cd.reload()
            if (self.scan_type == 'contscan_file'):
                self.scanresult = '{0}\n'.format(cd.contscan_file(self.file))
            elif (self.scan_type == 'multiscan_file'):
                self.scanresult = '{0}\n'.format(cd.multiscan_file(self.file))
            elif (self.scan_type == 'scan_file'):
                self.scanresult = '{0}\n'.format(cd.scan_file(self.file))
            time.sleep(1)
        else:
            self.connstr = (self.IP + '    ping    error,exit')
            return
    except Exception as e:
        self.connstr = ((self.IP + '    ') + str(e))
