projects
/
seabios.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94dc9c4
)
Report meaningful error if pyserial not present in tools/readserial.py
author
Kevin O'Connor
<kevin@koconnor.net>
Mon, 18 Oct 2010 01:38:38 +0000
(21:38 -0400)
committer
Kevin O'Connor
<kevin@koconnor.net>
Mon, 18 Oct 2010 01:38:38 +0000
(21:38 -0400)
tools/readserial.py
patch
|
blob
|
history
diff --git
a/tools/readserial.py
b/tools/readserial.py
index 505c014641f32ae0350ee35fee677cac2000bda5..9c955c6111f25badfe1b58a861f1aec3cd2ed248 100755
(executable)
--- a/
tools/readserial.py
+++ b/
tools/readserial.py
@@
-111,7
+111,15
@@
def main():
if options.serial:
# Read from serial port
- import serial
+ try:
+ import serial
+ except ImportError:
+ print """
+Unable to find pyserial package ( http://pyserial.sourceforge.net/ ).
+On Linux machines try: yum install pyserial
+Or: apt-get install python-serial
+"""
+ sys.exit(1)
ser = serial.Serial(serialport, baud, timeout=0)
else:
# Read from a file