--- a/eric6/Preferences/ViewProfileDialog.py Thu Apr 08 17:27:12 2021 +0200 +++ b/eric6/Preferences/ViewProfileDialog.py Thu Apr 08 18:27:47 2021 +0200 @@ -32,14 +32,15 @@ """ super(ViewProfileDialog, self).__init__(parent) + if layout not in ("Toolboxes", "Sidebars"): + raise ValueError( + "Illegal layout given ({0}).".format(self.__layout)) + self.__layout = layout if self.__layout == "Toolboxes": self.ui = Ui_ViewProfileToolboxesDialog() - elif self.__layout == "Sidebars": + else: self.ui = Ui_ViewProfileSidebarsDialog() - else: - raise ValueError( - "Illegal layout given ({0}).".format(self.__layout)) self.ui.setupUi(self) if self.__layout in ["Toolboxes", "Sidebars"]: