From 2f4c67d20f75168837b92bb84178fa58ffd88d8c Mon Sep 17 00:00:00 2001 From: Chris Schlaeger Date: Mon, 31 Aug 2015 21:07:24 +0200 Subject: Fix: Don't crash when unknown devices show up --- lib/postrunner/DeviceList.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') 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', -- cgit v1.2.3