diff -r 82b608e352ec -r 2bbec88047dd eric6/Plugins/VcsPlugins/vcsGit/GitFetchDialog.py --- a/eric6/Plugins/VcsPlugins/vcsGit/GitFetchDialog.py Wed Apr 21 17:56:12 2021 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsGit/GitFetchDialog.py Wed Apr 21 19:40:50 2021 +0200 @@ -123,10 +123,11 @@ """ singleSelection = len(self.remoteBranchesList.selectedItems()) == 1 self.localBranchComboBox.setEnabled(singleSelection) - if singleSelection: - txt = self.remoteBranchesList.selectedItems()[0].text() - else: - txt = "" + txt = ( + self.remoteBranchesList.selectedItems()[0].text() + if singleSelection else + "" + ) index = self.localBranchComboBox.findText(txt) if index == -1: self.localBranchComboBox.setEditText(txt)