Skip to content

Commit d552ea0

Browse files
committed
libs: Add warnings library.
Signed-off-by: lbuque <[email protected]>
1 parent 82847b8 commit d552ea0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

m5stack/libs/manifest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@
2727
module("m5camera.py")
2828
module("pid.py")
2929
include("iot_devices/manifest.py")
30+
module("warnings.py")

m5stack/libs/warnings.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2013-2014 micropython-lib contributors
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
6+
def warn(msg, cat=None, stacklevel=1):
7+
print("%s: %s" % ("Warning" if cat is None else cat.__name__, msg))

0 commit comments

Comments
 (0)