Preferences/ConfigurationPages/WebBrowserVirusTotalPage.py

Sat, 30 Jun 2018 13:56:44 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 30 Jun 2018 13:56:44 +0200
changeset 6380
4a932a7ab987
parent 6048
82ad8ec9548c
child 6385
9407026610bb
permissions
-rw-r--r--

Configuration pages: corrected the constructor of some configuration pages.

6041
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
6048
82ad8ec9548c Updated copyright for 2018.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6041
diff changeset
3 # Copyright (c) 2011 - 2018 Detlev Offenbach <detlev@die-offenbachs.de>
6041
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing VirusTotal configuration page (web browser variant).
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 from __future__ import unicode_literals
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 from PyQt5.QtCore import pyqtSlot
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 from .ConfigurationPageBase import ConfigurationPageBase
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 from .Ui_HelpVirusTotalPage import Ui_HelpVirusTotalPage
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 import Preferences
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 class WebBrowserVirusTotalPage(ConfigurationPageBase, Ui_HelpVirusTotalPage):
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 """
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 Class implementing VirusTotal configuration page (web browser variant).
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 """
6380
4a932a7ab987 Configuration pages: corrected the constructor of some configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
24 def __init__(self):
6041
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 """
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 Constructor
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 """
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 super(WebBrowserVirusTotalPage, self).__init__()
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 self.setupUi(self)
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 self.setObjectName("HelpVirusTotalPage")
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 self.testResultLabel.setHidden(True)
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 from WebBrowser.VirusTotal.VirusTotalApi import VirusTotalAPI
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 self.__vt = VirusTotalAPI(self)
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 self.__vt.checkServiceKeyFinished.connect(
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 self.__checkServiceKeyFinished)
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 # set initial values
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 self.vtEnabledCheckBox.setChecked(
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 Preferences.getHelp("VirusTotalEnabled"))
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 self.vtSecureCheckBox.setChecked(
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43 Preferences.getHelp("VirusTotalSecure"))
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 self.vtServiceKeyEdit.setText(
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 Preferences.getHelp("VirusTotalServiceKey"))
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47 def save(self):
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 """
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 Public slot to save the VirusTotal configuration.
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 """
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 Preferences.setHelp(
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52 "VirusTotalEnabled",
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53 self.vtEnabledCheckBox.isChecked())
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 Preferences.setHelp(
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 "VirusTotalSecure",
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 self.vtSecureCheckBox.isChecked())
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57 Preferences.setHelp(
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58 "VirusTotalServiceKey",
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 self.vtServiceKeyEdit.text())
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
60
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 @pyqtSlot(str)
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 def on_vtServiceKeyEdit_textChanged(self, txt):
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63 """
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 Private slot to handle changes of the service key.
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 @param txt entered service key (string)
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 """
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 self.testButton.setEnabled(txt != "")
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70 @pyqtSlot()
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 def on_testButton_clicked(self):
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 """
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
73 Private slot to test the entered service key.
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74 """
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75 self.testResultLabel.setHidden(False)
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76 self.testResultLabel.setText(
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 self.tr("Checking validity of the service key..."))
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78 if self.vtSecureCheckBox.isChecked():
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79 protocol = "https"
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80 else:
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81 protocol = "http"
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82 self.__vt.checkServiceKeyValidity(
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 self.vtServiceKeyEdit.text(), protocol)
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85 @pyqtSlot(bool, str)
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 def __checkServiceKeyFinished(self, result, msg):
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 """
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 Private slot to receive the result of the service key check.
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 @param result flag indicating a successful check (boolean)
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 @param msg network error message (str)
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 """
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 if result:
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 self.testResultLabel.setText(
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95 self.tr("The service key is valid."))
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 else:
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97 if msg == "":
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 self.testResultLabel.setText(self.tr(
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99 '<font color="#FF0000">The service key is'
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 ' not valid.</font>'))
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 else:
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 self.testResultLabel.setText(self.tr(
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 '<font color="#FF0000"><b>Error:</b> {0}</font>')
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104 .format(msg))
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 def create(dlg):
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 """
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 Module function to create the configuration page.
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 @param dlg reference to the configuration dialog
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112 @return reference to the instantiated page (ConfigurationPageBase)
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 """
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 page = WebBrowserVirusTotalPage(dlg)
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115 return page

eric ide

mercurial