Touchbot II: fix typo in line.py
There was a little bug in line.py where the order of operations was
trying to apply a formatter to a string before concatenating it all
together. The result was a crash whenever it tried to print out the
usage message. This patch puts some parenthesis around the string
concatenation to make sure all of the formatters have a place to go now.
BUG=chromium:312872
TEST=tested on Lumpy, it works and can print error messages without
crashing now.
Change-Id: I7bef4c54fdada1cfa024fbe079639939d774a0f2
Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/174983
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>
diff --git a/touchbotII/line.py b/touchbotII/line.py
index ef78210..a20e7f0 100644
--- a/touchbotII/line.py
+++ b/touchbotII/line.py
@@ -43,8 +43,8 @@
speed = float(sys.argv[14])
is_swipe = bool(sys.argv[15] == 'swipe')
except:
- print ('Usage: python %s device.p start end finger_states speed ' +
- '[swipe|basic]' % __file__)
+ print (('Usage: python %s device.p start end finger_states speed ' +
+ '[swipe|basic]') % __file__)
print ' * start and end: formatted as x y angle finger_distance'
print ' * finger_states: a list of 4 values (1s and 0s)'
print ' * speed: a decimal value for the speed in mm/s'