--- a/eric6/Plugins/VcsPlugins/vcsGit/GitDiffGenerator.py Wed Jun 17 17:12:21 2020 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsGit/GitDiffGenerator.py Wed Jun 17 20:18:54 2020 +0200 @@ -78,9 +78,12 @@ 'stash' shows the diff for a stash) @param stashName name of the stash to show a diff for (string) @return flag indicating the start status (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.__output1 = [] self.__output2 = []