eric6/PipInterface/PipFreezeDialog.py

branch
maintenance
changeset 8273
698ae46f40a4
parent 8176
31965986ecd1
parent 8259
2bbec88047dd
--- a/eric6/PipInterface/PipFreezeDialog.py	Fri Apr 02 11:59:41 2021 +0200
+++ b/eric6/PipInterface/PipFreezeDialog.py	Sat May 01 14:27:20 2021 +0200
@@ -37,7 +37,7 @@
         @param parent reference to the parent widget
         @type QWidget
         """
-        super(PipFreezeDialog, self).__init__(parent)
+        super().__init__(parent)
         self.setupUi(self)
         self.setWindowFlags(Qt.WindowType.Window)
         
@@ -112,14 +112,15 @@
         """
         Private slot to refresh the displayed list.
         """
-        if self.__requirementsEdited:
-            ok = E5MessageBox.yesNo(
+        ok = (
+            E5MessageBox.yesNo(
                 self,
                 self.tr("Generate Requirements"),
                 self.tr("""The requirements were changed. Do you want"""
                         """ to overwrite these changes?"""))
-        else:
-            ok = True
+            if self.__requirementsEdited else
+            True
+        )
         if ok:
             self.start(self.__environmentName)
     

eric ide

mercurial