action/ip_from_dnsmasq: Handle nil container hwaddr value

This commit is contained in:
Fabio Rehm 2014-05-12 23:56:39 -03:00
parent 4d45a4082b
commit 2db9aa89a1

View file

@ -19,7 +19,7 @@ module Vagrant
dnsmasq_leases = read_dnsmasq_leases
@logger.debug "Attempting to load ip from dnsmasq leases (mac: #{mac_address})"
@logger.debug dnsmasq_leases
if dnsmasq_leases =~ /#{Regexp.escape mac_address}\s+([0-9.]+)\s+/i
if dnsmasq_leases =~ /#{Regexp.escape mac_address.to_s}\s+([0-9.]+)\s+/i
ip = $1.to_s
break
else