Skip to content

Commit a632155

Browse files
committed
wire example: use logging.warning() instead of print()
1 parent 0825385 commit a632155

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/wire.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
66
"""
77
import argparse
8+
import logging
89

910
parser = argparse.ArgumentParser(description=__doc__)
1011
parser.add_argument("-i", "--input-device", type=int, help="input device ID")
@@ -37,7 +38,7 @@ def callback(indata, outdata, frames, time, status):
3738
input()
3839

3940
if callback_status:
40-
print(callback_status)
41+
logging.warning(str(callback_status))
4142
except BaseException as e:
4243
# This avoids printing the traceback, especially if Ctrl-C is used.
4344
raise SystemExit(str(e))

0 commit comments

Comments
 (0)