use: "device.type" in dev_vars instead of: dev_vars.has_key( "device.type" )
Same goes for the line with ups.model.
use: "device.type" in dev_vars
instead of: dev_vars.has_key( "device.type" )
Same goes for the line with ups.model.