eric6/Plugins/VcsPlugins/vcsMercurial/LargefilesExtension/ProjectHelper.py

changeset 7628
f904d0eef264
parent 7533
88261c96484b
child 7780
41420f82c0ac
diff -r 7f643d41464e -r f904d0eef264 eric6/Plugins/VcsPlugins/vcsMercurial/LargefilesExtension/ProjectHelper.py
--- a/eric6/Plugins/VcsPlugins/vcsMercurial/LargefilesExtension/ProjectHelper.py	Wed Jun 17 17:12:21 2020 +0200
+++ b/eric6/Plugins/VcsPlugins/vcsMercurial/LargefilesExtension/ProjectHelper.py	Wed Jun 17 20:18:54 2020 +0200
@@ -194,8 +194,11 @@
         
         @param direction direction of the conversion (string; one of
             'largefiles' or 'normal')
+        @exception ValueError raised to indicate a bad value for the
+            'direction' parameter.
         """
-        assert direction in ["largefiles", "normal"]
+        if direction not in ["largefiles", "normal"]:
+            raise ValueError("Bad value for 'direction' parameter.")
         
         self.vcs.getExtensionObject("largefiles").hgLfconvert(
             direction, self.project.getProjectFile())
@@ -218,8 +221,11 @@
         Private slot to verify large files integrity.
         
         @param mode verify mode (string; one of 'large', 'lfa' or 'lfc')
+        @exception ValueError raised to indicate a bad value for the
+            'mode' parameter.
         """
-        assert mode in ['large', 'lfa', 'lfc']
+        if mode not in ['large', 'lfa', 'lfc']:
+            raise ValueError("Bad value for 'mode' parameter.")
         
         self.vcs.getExtensionObject("largefiles").hgLfVerify(
             self.project.getProjectPath(), mode)

eric ide

mercurial