[CRASH CONDITION] - Guard self.unit against None
Author: VbhvGuptaCreated Aug 12, 2025Updated Jul 15, 2026
If
self.interval == 1is True, and,self.unitis None (which is what its being initialized to here) : https://github.com/dbader/schedule/blob/3863effe15ec8239ba88c65a4231a67e43b116df/schedule/__init__.py#L232 It results in crash.The code should guard against
self.unitbeing None before attemptingself.unit[:-1]
Source: dbader/schedule