eric6/Plugins/VcsPlugins/vcsGit/GitDiffGenerator.py

changeset 7628
f904d0eef264
parent 7360
9190402e4505
child 7771
787a6b3f8c9f
--- 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 = []

eric ide

mercurial