Sun, 16 May 2021 20:07:24 +0200
Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
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 | |
7923
91e843545d9a
Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7780
diff
changeset
|
3 | # Copyright (c) 2011 - 2021 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 | |
8318
962bce857696
Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8312
diff
changeset
|
10 | from PyQt6.QtCore import pyqtSlot |
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
|
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 .ConfigurationPageBase import ConfigurationPageBase |
7294
3eda4847a02b
WebBrowserVirusTotalPage: fixed an issue causing this configuration page not to be shown.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7229
diff
changeset
|
13 | from .Ui_WebBrowserVirusTotalPage import Ui_WebBrowserVirusTotalPage |
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
|
14 | |
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 | 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
|
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 | |
7294
3eda4847a02b
WebBrowserVirusTotalPage: fixed an issue causing this configuration page not to be shown.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7229
diff
changeset
|
18 | class WebBrowserVirusTotalPage(ConfigurationPageBase, |
3eda4847a02b
WebBrowserVirusTotalPage: fixed an issue causing this configuration page not to be shown.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7229
diff
changeset
|
19 | Ui_WebBrowserVirusTotalPage): |
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
|
20 | """ |
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 | 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
|
22 | """ |
6380
4a932a7ab987
Configuration pages: corrected the constructor of some configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6048
diff
changeset
|
23 | 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
|
24 | """ |
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 | 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
|
26 | """ |
8218
7c09585bd960
Applied some more code simplifications suggested by the new Simplify checker (super(Foo, self) => super()).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
7923
diff
changeset
|
27 | super().__init__() |
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
|
28 | 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
|
29 | 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
|
30 | |
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 | 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
|
32 | |
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 | 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
|
34 | 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
|
35 | 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
|
36 | 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
|
37 | |
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 | # 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
|
39 | self.vtEnabledCheckBox.setChecked( |
7196
ab0a91b82b37
Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6942
diff
changeset
|
40 | Preferences.getWebBrowser("VirusTotalEnabled")) |
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
|
41 | self.vtSecureCheckBox.setChecked( |
7196
ab0a91b82b37
Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6942
diff
changeset
|
42 | Preferences.getWebBrowser("VirusTotalSecure")) |
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
|
43 | self.vtServiceKeyEdit.setText( |
7196
ab0a91b82b37
Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6942
diff
changeset
|
44 | Preferences.getWebBrowser("VirusTotalServiceKey")) |
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
|
45 | |
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 | 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
|
47 | """ |
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 | 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
|
49 | """ |
7196
ab0a91b82b37
Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6942
diff
changeset
|
50 | Preferences.setWebBrowser( |
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
|
51 | "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
|
52 | self.vtEnabledCheckBox.isChecked()) |
7196
ab0a91b82b37
Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6942
diff
changeset
|
53 | Preferences.setWebBrowser( |
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
|
54 | "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
|
55 | self.vtSecureCheckBox.isChecked()) |
7196
ab0a91b82b37
Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6942
diff
changeset
|
56 | Preferences.setWebBrowser( |
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
|
57 | "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
|
58 | 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
|
59 | |
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 | @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
|
61 | 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
|
62 | """ |
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 | 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
|
64 | |
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 | @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
|
66 | """ |
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 | 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
|
68 | |
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 | @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
|
70 | 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
|
71 | """ |
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 | 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
|
73 | """ |
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 | 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
|
75 | 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
|
76 | self.tr("Checking validity of the service key...")) |
8234
fcb6b4b96274
Applied some more code simplifications suggested by the new Simplify checker (Y108: use ternary operator) (batch 2).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8218
diff
changeset
|
77 | protocol = "https" if self.vtSecureCheckBox.isChecked() else "http" |
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
|
78 | 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
|
79 | 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
|
80 | |
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 | @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
|
82 | 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
|
83 | """ |
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 | 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
|
85 | |
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 | @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
|
87 | @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
|
88 | """ |
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 | 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
|
90 | 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
|
91 | 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
|
92 | 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
|
93 | 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
|
94 | 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
|
95 | '<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
|
96 | ' 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
|
97 | 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
|
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"><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
|
100 | .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
|
101 | |
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 | |
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 | 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
|
104 | """ |
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 | 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
|
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 | @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
|
108 | @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
|
109 | """ |
6385
9407026610bb
Fixed an issue introduced by recent changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
6380
diff
changeset
|
110 | page = WebBrowserVirusTotalPage() |
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
|
111 | return page |