Added string representation of LocError

This commit is contained in:
Joel Collins 2019-01-29 13:41:46 +00:00
parent b4d9840ed0
commit 485ebe9fb1

View file

@ -15,6 +15,11 @@ class LockError(ThreadError):
self.message = LockError.ERROR_CODES[code]
else:
self.message = "Unknown error."
print("{}: {}".format(self.code, self.message))
self.string = "{}: {}".format(self.code, self.message)
print(self.string)
ThreadError.__init__(self)
ThreadError.__init__(self)
def __str__(self):
return self.string