Revision 4f650d54 ncclient/util.py

b/ncclient/util.py
12 12
# See the License for the specific language governing permissions and
13 13
# limitations under the License.
14 14

  
15
from ncclient.glue import Listener
15
from ncclient.transport import SessionListener
16

  
17
class PrintListener(SessionListener):
16 18

  
17
class PrintListener(Listener):
18
    
19 19
    def callback(self, root, raw):
20 20
        print('\n# RECEIVED MESSAGE with root=[tag=%r, attrs=%r] #\n%r\n' %
21 21
              (root[0], root[1], raw))
22
    
22

  
23 23
    def errback(self, err):
24 24
        print('\n# RECEIVED ERROR #\n%r\n' % err)

Also available in: Unified diff