# HG changeset patch
# User Katelyn Schiesser <kschiesser@laika.com>
# Date 1555614661 25200
# Node ID d36032444b99b81fa1261bae2c6e0934e10cc193
# Parent  58e70e52f8172da7ca909ae77fe5871fb3da1acf
remove nil predicate

diff -r 58e70e52f817 -r d36032444b99 lib/arborist/monitor/snmp/ups/battery.rb
--- a/lib/arborist/monitor/snmp/ups/battery.rb	Thu Apr 18 11:59:38 2019 -0700
+++ b/lib/arborist/monitor/snmp/ups/battery.rb	Thu Apr 18 12:11:01 2019 -0700
@@ -86,11 +86,11 @@
 
 		# don't report voltage if the UPS doesn't
 		voltage = snmp.get( oid: OIDS[:battery_voltage] ) rescue nil
-		info[ :voltage ] = voltage / 10 unless voltage.nil?
+		info[ :voltage ] = voltage / 10 if voltage
 
 		# don't report current if the UPS doesn't
 		current = snmp.get( oid: OIDS[:battery_current] ) rescue nil
-		info[ :current ] = current/10 unless current.nil?
+		info[ :current ] = current/10 if current
 
 		# see if we are on battery
 		info[ :seconds_on_battery ] = snmp.get( oid: OIDS[:seconds_on_battery] ) rescue 0