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:
parent
c94e765391
commit
9111261f79
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue