Revision 2f8bc438 ncclient/transport/hello.py

b/ncclient/transport/hello.py
17 17
from xml.etree import cElementTree as ET
18 18

  
19 19
from ncclient.glue import Listener
20
from ncclient.content import TreeBuilder, BASE_NS
20
from ncclient.content import XMLConverter, BASE_NS
21 21
from ncclient.content import qualify as _
22 22
from ncclient.content import unqualify as __
23 23

  
......
43 43
        self._error_cb(err)
44 44
    
45 45
    @staticmethod
46
    def build(capabilities, encoding='utf-8'):
46
    def build(capabilities):
47 47
        "Given a list of capability URI's returns encoded <hello> message"
48 48
        spec = {
49 49
            'tag': _('hello', BASE_NS),
......
53 53
                    [{ 'tag': 'capability', 'text': uri} for uri in capabilities]
54 54
                }]
55 55
            }
56
        return TreeBuilder(spec).to_string(encoding)
56
        return XMLConverter(spec).to_string()
57 57
    
58 58
    @staticmethod
59 59
    def parse(raw):

Also available in: Unified diff