usertools: fix syntax warning in python 3.8