Revision ae4585f5 kamaki/clients/connection/errors.py

b/kamaki/clients/connection/errors.py
33 33

  
34 34

  
35 35
class KamakiConnectionError(Exception):
36
    errno = None
37 36

  
38 37
    def __init__(self, message, errno=None):
39 38
        super(KamakiConnectionError, self).__init__(message)
40
        if errno:
41
            self.errno = errno
39
        self.errno = errno if errno else 0
42 40

  
43 41

  
44 42
class KamakiResponseError(Exception):
45
    errno = None
46 43

  
47 44
    def __init__(self, message, errno=None):
48 45
        super(KamakiResponseError, self).__init__(message)
49
        if errno:
50
            self.errno = errno
46
        self.errno = errno if errno else 0

Also available in: Unified diff