kopia lustrzana https://github.com/micropython/micropython-lib
uasyncio.core: Add set_debug() method, don't import logging if not called.
rodzic
0a02e2dfff
commit
b2f69eb23b
|
@ -3,15 +3,21 @@ try:
|
|||
except ImportError:
|
||||
import time
|
||||
import utimeq
|
||||
import logging
|
||||
|
||||
|
||||
DEBUG = 0
|
||||
|
||||
log = logging.getLogger("asyncio")
|
||||
|
||||
type_gen = type((lambda: (yield))())
|
||||
|
||||
DEBUG = 0
|
||||
log = None
|
||||
|
||||
def set_debug(val):
|
||||
global DEBUG, log
|
||||
DEBUG = val
|
||||
if val:
|
||||
import logging
|
||||
log = logging.getLogger("uasyncio")
|
||||
|
||||
|
||||
class EventLoop:
|
||||
|
||||
def __init__(self, len=42):
|
||||
|
|
Ładowanie…
Reference in New Issue