From b5c440e4bc97fce1638f8a64553625624ca1f0c4 Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Fri, 1 Aug 2014 00:37:44 +0200 Subject: [PATCH] Change __self__.__classname__ to the actual class name in exceptions. --- lslopt/lslbasefuncs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lslopt/lslbasefuncs.py b/lslopt/lslbasefuncs.py index 63ee8ed..ef6fc2f 100644 --- a/lslopt/lslbasefuncs.py +++ b/lslopt/lslbasefuncs.py @@ -50,15 +50,15 @@ NaN = float('nan') class ELSLTypeMismatch(Exception): def __init__(self): - super(self.__class__, self).__init__("Type mismatch") + super(ELSLTypeMismatch, self).__init__("Type mismatch") class ELSLMathError(Exception): def __init__(self): - super(self.__class__, self).__init__("Math Error") + super(self.ELSLMathError, self).__init__("Math Error") class ELSLInvalidType(Exception): def __init__(self): - super(self.__class__, self).__init__("Internal error: Invalid type") + super(self.ELSLInvalidType, self).__init__("Internal error: Invalid type") # LSL types are translated to Python types as follows: # * LSL string -> Python unicode