ifstat.py: code cleanup