handlerInterface.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:autoupdate_blacklists 作者: elluscinia 项目源码 文件源码
def refresh_information(self):
        '''
        ?????????? ??????????
        :return:
        '''
        self.set_access_settings_and_commands(False)
        try:
            pythoncom.CoInitialize()
            object_tmg = win32com.client.Dispatch('FPC.Root')
            isa_array = object_tmg.GetContainingArray()
        except pythoncom.pywintypes.com_error as ce:
            self.statusBar.showMessage('??????????? ??????????? ? Forefront TMG', -1)
            self.set_access_settings_and_commands(False)
            return
        else:
            rule = isa_array.ArrayPolicy.PolicyRules.Item(self.choice_ruleName.currentText())

            rule_sets = rule.AccessProperties.DestinationDomainNameSets

            counter = 1

            self.domainNameSetsTMG.clear()
            self.operations.clear()

            self.progressBar.setValue(0)
            self.progressBar_download.setValue(0)

            while (counter <= rule_sets.Count):
                domain_set_name = rule_sets.Item(counter).Name
                item = QtWidgets.QListWidgetItem(domain_set_name)
                self.domainNameSetsTMG.addItem(item)
                counter += 1

            self.set_access_settings_and_commands(True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号