Added string representation of LocError
This commit is contained in:
parent
b4d9840ed0
commit
485ebe9fb1
1 changed files with 7 additions and 2 deletions
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue