ProjectPyramid/DistributionTypeSelectionDialog.py

changeset 138
72ebb74aa42d
parent 132
c0d53fb9a0e0
child 143
4ef44e854b39
--- a/ProjectPyramid/DistributionTypeSelectionDialog.py	Thu Apr 09 18:34:09 2020 +0200
+++ b/ProjectPyramid/DistributionTypeSelectionDialog.py	Tue Jun 23 18:14:14 2020 +0200
@@ -7,19 +7,14 @@
 Module implementing a dialog to select the distribution file formats.
 """
 
-from __future__ import unicode_literals
-try:
-    str = unicode
-except NameError:
-    pass
-
 from PyQt5.QtCore import Qt, QProcess
 from PyQt5.QtWidgets import QDialog, QListWidgetItem
 
 from E5Gui import E5MessageBox
 
-from .Ui_DistributionTypeSelectionDialog import \
+from .Ui_DistributionTypeSelectionDialog import (
     Ui_DistributionTypeSelectionDialog
+)
 
 import Preferences
 
@@ -54,10 +49,9 @@
         if procStarted:
             finished = proc.waitForFinished(30000)
             if finished and proc.exitCode() == 0:
-                output = \
-                    str(proc.readAllStandardOutput(),
-                        Preferences.getSystem("IOEncoding"),
-                        'replace')
+                output = str(proc.readAllStandardOutput(),
+                             Preferences.getSystem("IOEncoding"),
+                             'replace')
             else:
                 if not finished:
                     errMsg = self.tr(
@@ -69,8 +63,8 @@
             for line in output.splitlines():
                 line = line.strip()
                 if line.startswith("--formats="):
-                    fileFormat, description = line.replace("--formats=", "")\
-                        .split(None, 1)
+                    fileFormat, description = (
+                        line.replace("--formats=", "").split(None, 1))
                     itm = QListWidgetItem(
                         "{0} ({1})".format(fileFormat, description),
                         self.formatsList)

eric ide

mercurial