summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Schlaeger <chris@linux.com>2015-08-31 21:07:24 +0200
committerChris Schlaeger <chris@linux.com>2015-08-31 21:07:24 +0200
commit2f4c67d20f75168837b92bb84178fa58ffd88d8c (patch)
treee76fadd83cc5b718ef369fe9f1547f4f8e272246 /lib
parent1b02b4c99215272711477bee02f1eda5d38c9270 (diff)
downloadpostrunner-2f4c67d20f75168837b92bb84178fa58ffd88d8c.zip
Fix: Don't crash when unknown devices show up
Diffstat (limited to 'lib')
-rw-r--r--lib/postrunner/DeviceList.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/postrunner/DeviceList.rb b/lib/postrunner/DeviceList.rb
index 51a3502..20b976c 100644
--- a/lib/postrunner/DeviceList.rb
+++ b/lib/postrunner/DeviceList.rb
@@ -54,6 +54,8 @@ module PostRunner
if (product = %w( garmin dynastream dynastream_oem ).include?(
device.manufacturer) ?
device.garmin_product : device.product)
+ # For unknown products the numerical ID will be returned.
+ product = product.to_s unless product.is_a?(String)
t.cell('Product:')
# Beautify some product names. The others will just be upcased.
rename = { 'hrm_run_single_byte_product_id' => 'HRM Run',