eric6/Project/TranslationPropertiesDialog.py

changeset 8259
2bbec88047dd
parent 8218
7c09585bd960
diff -r 82b608e352ec -r 2bbec88047dd eric6/Project/TranslationPropertiesDialog.py
--- a/eric6/Project/TranslationPropertiesDialog.py	Wed Apr 21 17:56:12 2021 +0200
+++ b/eric6/Project/TranslationPropertiesDialog.py	Wed Apr 21 19:40:50 2021 +0200
@@ -129,10 +129,11 @@
         Private slot to add the shown exception to the listwidget.
         """
         texcept = self.exceptionEdit.text()
-        if self.project.ppath == '':
-            texcept = texcept.replace(self.parent.getPPath() + os.sep, "")
-        else:
-            texcept = self.project.getRelativePath(texcept)
+        texcept = (
+            texcept.replace(self.parent.getPPath() + os.sep, "")
+            if self.project.ppath == '' else
+            self.project.getRelativePath(texcept)
+        )
         if texcept.endswith(os.sep):
             texcept = texcept[:-1]
         if texcept:

eric ide

mercurial