driver: Do not show a stacktrace to the user if no network.hwaddr is present on container configs

This is enough to close GH-266 since Vagrant will take care of showing
an error informing the user that it was unable to connect to the
machine.
This commit is contained in:
Fabio Rehm 2014-05-12 23:21:40 -03:00
parent c94e765391
commit 9111261f79

View file

@ -44,7 +44,11 @@ module Vagrant
end end
def mac_address def mac_address
@mac_address ||= config_string.match(/^lxc\.network\.hwaddr\s*+=\s*+(.+)$/)[1] return @mac_address if @mac_address
if config_string =~ /^lxc\.network\.hwaddr\s*+=\s*+(.+)$/
@mac_address = $1
end
end end
def config_string def config_string