[bitbar] Default OBA color to black
change
commit 22061804d36dd113ed16ba6d682933640eaa6d03
author Alpha Chen <alpha.chen@gmail.com>
date
parent a300edcf
diff --git a/bitbar/onebusaway.30s.rb b/bitbar/onebusaway.30s.rb
index 5c279448..4edf5eb9 100755
--- a/bitbar/onebusaway.30s.rb
+++ b/bitbar/onebusaway.30s.rb
@@ -20,7 +20,7 @@ doc = REXML::Document.new(html)
 status = doc.elements['//td[contains(@class, "arrivalsStatusEntry")]']
 
 minutes = status.elements['.//span'].text
-color = COLOR_MAP[status.attributes['class'].split(/\s+/).last.to_sym]
+color = COLOR_MAP.fetch(status.attributes['class'].split(/\s+/).last.to_sym, :black)
 times = doc.elements.to_a('//div[@class="arrivalsTimePanel"]')
 
 puts "#{minutes} | color=#{color}"