Bug#568512: python-brlapi: ConnectionError is invalidly specified
Yes, it will work too. You could also initialize self.exception right at
the beginning of the __init__ method, so that you are sure that it is
defined, even if you introduce other cases later.
Olivier
--- brlapi.pyx.OLD 2010-02-08 11:53:37.000000000 +0100
+++ brlapi.pyx 2010-02-08 11:53:56.000000000 +0100
@@ -80,6 +80,7 @@
class OperationError(Exception):
"""Error while performing some operation"""
def __init__(self):
+ self.exception = None
cdef char *exception
exception = c_brlapi.brlapi_protocolException()
if (exception):
Reply to: