write_sched_switch.py: Fix pyflakes and pep-8 warnings

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>