Skip to content

Commit 2d7881f

Browse files
committed
delay_ms.py: Fix for issue 98.
1 parent c0dcaca commit 2d7881f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

v3/primitives/delay_ms.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def callback(self, func=None, args=()):
7575
self._args = args
7676

7777
def deinit(self):
78-
self.stop()
79-
self._mtask.cancel()
80-
self._mtask = None
78+
if self._mtask is not None: # https://github.com/peterhinch/micropython-async/issues/98
79+
self.stop()
80+
self._mtask.cancel()
81+
self._mtask = None

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy