swconfig: make it compatible with 3.7