Revision b4e9d4c2 ncclient/operations/reply.py

b/ncclient/operations/reply.py
53 53
                d = {}
54 54
                for err_detail in err.getchildren(): # <error-type> etc..
55 55
                    tag = __(err_detail.tag)
56
                    d[tag] = (err_detail.text if tag != 'error-info'
56
                    d[tag] = (err_detail.text.strip() if tag != 'error-info'
57 57
                              else ET.tostring(err_detail, 'utf-8'))
58 58
                self._errors.append(RPCError(d))
59 59
            if self._errors:
60 60
                break
61
        
61 62
        self._parsed = True
62 63
    
63 64
    @property
......
67 68
    @property
68 69
    def ok(self):
69 70
        if not self._parsed: self.parse()
70
        return not bool(self._errors) # empty list = false
71
        return not self._errors # empty list => false
71 72
    
72 73
    @property
73 74
    def errors(self):

Also available in: Unified diff