Fixed a bug introduced with the recent changes.

Wed, 23 Dec 2020 10:12:14 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 23 Dec 2020 10:12:14 +0100
changeset 7908
33afc8e96e19
parent 7907
7991ea245c20
child 7909
ad9f1dc09b4a

Fixed a bug introduced with the recent changes.

eric6/Utilities/PySideImporter.py file | annotate | diff | comparison | revisions
eric6/Utilities/__init__.py file | annotate | diff | comparison | revisions
--- a/eric6/Utilities/PySideImporter.py	Tue Dec 22 19:59:29 2020 +0100
+++ b/eric6/Utilities/PySideImporter.py	Wed Dec 23 10:12:14 2020 +0100
@@ -12,7 +12,7 @@
 if __name__ == "__main__":
     pySideVariant = "2"
     if len(sys.argv) == 2:
-        pySideVariant = sys.argv[1].replace("-", "")
+        pySideVariant = sys.argv[1].replace("--variant=", "")
     
     if pySideVariant == "1":
         # no PySide support anymore
--- a/eric6/Utilities/__init__.py	Tue Dec 22 19:59:29 2020 +0100
+++ b/eric6/Utilities/__init__.py	Wed Dec 23 10:12:14 2020 +0100
@@ -1804,14 +1804,14 @@
 ###############################################################################
 
 
-def generatePySideToolPath(toolname, variant="2"):
+def generatePySideToolPath(toolname, variant=2):
     """
     Module function to generate the executable path for a PySide2 tool.
     
     @param toolname base name of the tool
     @type str
     @param variant indicator for the PySide variant (not used)
-    @type str
+    @type int
     @return the PySide2 tool path with extension
     @rtype str
     """
@@ -1866,12 +1866,12 @@
                                 "PySide2", toolname)
 
 
-def checkPyside(variant="2"):
+def checkPyside(variant=2):
     """
     Module function to check the presence of PySide2.
     
     @param variant indicator for the PySide variant (not used)
-    @type str
+    @type int
     @return flags indicating the presence of PySide2
     @rtype bool
     """
@@ -1889,7 +1889,7 @@
     
     checker = os.path.join(
         getConfig('ericDir'), "Utilities", "PySideImporter.py")
-    args = [checker, "-" + variant]
+    args = [checker, "--variant={0}".format(variant)]
     proc = QProcess()
     proc.setProcessChannelMode(QProcess.MergedChannels)
     proc.start(interpreter, args)

eric ide

mercurial