--- a/eric6/Plugins/VcsPlugins/vcsGit/GitDiffDialog.py Wed Jun 17 17:12:21 2020 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsGit/GitDiffDialog.py Wed Jun 17 20:18:54 2020 +0200 @@ -123,9 +123,12 @@ 'stash' shows the diff for a stash) @param stashName name of the stash to show a diff for (string) @param refreshable flag indicating a refreshable diff (boolean) + @exception ValueError raised to indicate a bad value for the 'diffMode' + parameter. """ - assert diffMode in ["work2repo", "work2stage", "stage2repo", - "work2stage2repo", "stash"] + if diffMode not in ["work2repo", "work2stage", "stage2repo", + "work2stage2repo", "stash"]: + raise ValueError("Bad value for 'diffMode' parameter.") self.refreshButton.setVisible(refreshable)