fix next for python3 compatible

Signed-off-by: sthsieh <sthsieh@synology.com>