|
28 | 28 | QLocale, QByteArray)
|
29 | 29 | from qgis.PyQt.QtXml import QDomDocument
|
30 | 30 | from qgis.PyQt.QtNetwork import QNetworkRequest, QNetworkReply
|
31 |
| -from qgis.core import QgsSettings |
| 31 | +from qgis.core import Qgis, QgsSettings |
32 | 32 | import sys
|
33 | 33 | import os
|
34 | 34 | import codecs
|
35 | 35 | import re
|
36 |
| -try: |
37 |
| - import configparser |
38 |
| -except ImportError: |
39 |
| - import configparser as configparser |
40 |
| -try: |
41 |
| - from importlib import reload |
42 |
| -except ImportError: |
43 |
| - from imp import reload |
| 36 | +import configparser |
44 | 37 | import qgis.utils
|
45 | 38 | from qgis.core import QgsNetworkAccessManager, QgsApplication
|
46 |
| -from qgis.gui import QgsMessageBar |
47 | 39 | from qgis.utils import iface, plugin_paths
|
48 | 40 | from .version_compare import pyQgisVersion, compareVersions, normalizeVersion, isCompatible
|
49 | 41 |
|
@@ -565,7 +557,7 @@ def getInstalledPlugin(self, key, path, readOnly):
|
565 | 557 | """ get the metadata of an installed plugin """
|
566 | 558 | def metadataParser(fct):
|
567 | 559 | """ plugin metadata parser reimplemented from qgis.utils
|
568 |
| - for better control on wchich module is examined |
| 560 | + for better control of which module is examined |
569 | 561 | in case there is an installed plugin masking a core one """
|
570 | 562 | global errorDetails
|
571 | 563 | cp = configparser.ConfigParser()
|
@@ -625,7 +617,7 @@ def pluginMetadata(fct):
|
625 | 617 | else:
|
626 | 618 | error = "broken"
|
627 | 619 | e = errorDetails
|
628 |
| - errorDetails = QCoreApplication.translate("QgsPluginInstaller", u"Error reading metadata") |
| 620 | + errorDetails = QCoreApplication.translate("QgsPluginInstaller", "Error reading metadata") |
629 | 621 | if e:
|
630 | 622 | errorDetails += ": " + e
|
631 | 623 |
|
|
0 commit comments