protocollabs / dmprd

Dynamic MultiPath Routing Daemon for Linux
MIT License
1 stars 1 forks source link

Non working dmprd after dmpr-core changes #5

Closed hgn closed 7 years ago

hgn commented 7 years ago

The following error is raised after starting dmprd via ./dmprd.py -f config.json:

Traceback (most recent call last):
  File "./dmprd.py", line 511, in <module>
    main()
  File "./dmprd.py", line 491, in main
    setup_core(ctx)
  File "./dmprd.py", line 121, in setup_core
    ctx['core'].register_routing_table_update_cb(cb_routing_table_update, priv_data=ctx)
TypeError: register_routing_table_update_cb() got an unexpected keyword argument 'priv_data'
Close <_UnixSelectorEventLoop running=False closed=False debug=True>

Here the priv_data was removed. So after checking the code my prefered solution - to keep the implementation as understandable as possible - to objectify this code. Wrap everything with an DMPRD class. MMmhh

As always for dmpr{d,-core} it is important that the code is as simple as possible. No fancy indirections, no additional classes where it makes the code harder to understand, no python fancy stuff, just pseudo-code style programming stuff.