Selaa lähdekoodia

catalog: fix typo and use appropriate exception

Alessio Bogon 10 vuotta sitten
vanhempi
commit
12e2701d1c
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      catalog.py

+ 2 - 2
catalog.py

@@ -3,7 +3,7 @@
 
 """
 A class that uses different static function depending of a parameter passed in
-init. Note the use of a single dictionnary instead of multiple conditions
+init. Note the use of a single dictionary instead of multiple conditions
 """
 __author__ = "Ibrahim Diop <http://ibrahim.zinaria.com>"
 __gist__ = "<https://gist.github.com/diopib/7679559>"
@@ -28,7 +28,7 @@ class Catalog():
         if param in self._static_method_choices.keys():
             self.param = param
         else:
-            raise Exception("Invalid Value for Param: {0}".format(param))
+            raise ValueError("Invalid Value for Param: {0}".format(param))
 
     @staticmethod
     def _static_method_1():