eric6/Plugins/VcsPlugins/vcsGit/GitDiffDialog.py

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

eric ide

mercurial