diff -r 82b608e352ec -r 2bbec88047dd eric6/Network/IRC/IrcIdentitiesEditDialog.py --- a/eric6/Network/IRC/IrcIdentitiesEditDialog.py Wed Apr 21 17:56:12 2021 +0200 +++ b/eric6/Network/IRC/IrcIdentitiesEditDialog.py Wed Apr 21 19:40:50 2021 +0200 @@ -337,15 +337,14 @@ if inUse: break - if inUse: - msg = self.tr( - """This identity is in use. If you remove it, the network""" - """ settings using it will fall back to the default""" - """ identity. Should it be deleted anyway?""") - else: - msg = self.tr( - """Do you really want to delete all information for""" - """ this identity?""") + msg = ( + self.tr("This identity is in use. If you remove it, the network" + " settings using it will fall back to the default" + " identity. Should it be deleted anyway?") + if inUse else + self.tr("Do you really want to delete all information for" + " this identity?") + ) res = E5MessageBox.yesNo( self, self.tr("Delete Identity"),