Update scheduler.py

Inline a variable used in one place only