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:
|
except ImportError:
|
||||||
import time
|
import time
|
||||||
import utimeq
|
import utimeq
|
||||||
import logging
|
|
||||||
|
|
||||||
|
|
||||||
DEBUG = 0
|
|
||||||
|
|
||||||
log = logging.getLogger("asyncio")
|
|
||||||
|
|
||||||
type_gen = type((lambda: (yield))())
|
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:
|
class EventLoop:
|
||||||
|
|
||||||
def __init__(self, len=42):
|
def __init__(self, len=42):
|
||||||
|
|
Ładowanie…
Reference in New Issue