diff --git a/Doc/library/sched.rst b/Doc/library/sched.rst index f93c9b5ace4..0290ec41cdf 100644 --- a/Doc/library/sched.rst +++ b/Doc/library/sched.rst @@ -100,7 +100,7 @@ Scheduler Objects .. method:: scheduler.cancel(event) Remove the event from the queue. If *event* is not an event currently in the - queue, this method will raise a :exc:`RuntimeError`. + queue, this method will raise a :exc:`ValueError`. .. method:: scheduler.empty() diff --git a/Lib/sched.py b/Lib/sched.py index 11bb0a3a186..f6a699c9162 100644 --- a/Lib/sched.py +++ b/Lib/sched.py @@ -73,7 +73,7 @@ class scheduler: """Remove an event from the queue. This must be presented the ID as returned by enter(). - If the event is not in the queue, this raises RuntimeError. + If the event is not in the queue, this raises ValueError. """ self._queue.remove(event)