py: adapting to libthryft changes