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