Skip to content

Commit 479f54b

Browse files
committed
Make sure to init the Exception baseclass
1 parent 7f5b5a6 commit 479f54b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cloudbot/util/func_utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33

44
class ParameterError(Exception):
55
def __init__(self, name, valid_args):
6-
self.name = name
7-
self.valid_args = list(valid_args)
6+
self.__init__(name, list(valid_args))
87

98
def __str__(self):
10-
return "'{}' is not a valid parameter, valid parameters are: {}".format(self.name, self.valid_args)
9+
return "'{}' is not a valid parameter, valid parameters are: {}".format(self.args[0], self.args[1])
1110

1211

1312
def call_with_args(func, arg_data):

0 commit comments

Comments
 (0)