python: fix some warnings.