--- a/eric6/E5Gui/E5MessageBox.py Wed Jun 17 17:12:21 2020 +0200 +++ b/eric6/E5Gui/E5MessageBox.py Wed Jun 17 20:18:54 2020 +0200 @@ -235,8 +235,10 @@ default button (boolean) @param textFormat format of the text (Qt.TextFormat) @return flag indicating the selection of the Yes button (boolean) + @exception ValueError raised to indicate a bad parameter value """ - assert icon in [Critical, Information, Question, Warning] + if icon not in [Critical, Information, Question, Warning]: + raise ValueError("Bad value for 'icon' parameter.") res = __messageBox( parent, title, text, icon, @@ -257,8 +259,10 @@ Warning) @param textFormat format of the text (Qt.TextFormat) @return flag indicating the selection of the Retry button (boolean) + @exception ValueError raised to indicate a bad parameter value """ - assert icon in [Critical, Information, Question, Warning] + if icon not in [Critical, Information, Question, Warning]: + raise ValueError("Bad value for 'icon' parameter.") res = __messageBox( parent, title, text, icon,