[CRASH CONDITION] - Guard self.unit against None
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start in schedule/init.py at the referenced line and inspect how self.unit is initialized near line 232. Reproduce the interval-one path where self.unit is None, then verify the guard prevents the crash and add or run a focused regression test if the repository provides one.
Written by the indexing model from the issue text.
Description
-
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]
- Dominant language
- Python
- Stars
- 12.3k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dbader/schedule
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
Bug when DST ends Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100