Unverified Commit 4330c490 authored by Fernando Verdugo's avatar Fernando Verdugo Committed by GitHub
Browse files

fix(backend): eval error with { (#1616)

fix(backend): eval error on dockers

issue #1615
parent c85686c6
......@@ -1640,13 +1640,13 @@ sub _ip_agent($self) {
}
}
sub _ip_arp($self) {
my @sys_virt_version = split('\.', $Sys::Virt::VERSION);
return undef if ($sys_virt_version[0] < 5);
my @ip;
eval { @ip = $self->domain->get_interface_addresses(Sys::Virt::Domain::INTERFACE_ADDRESSES_SRC_ARP); };
return @ip;
}
#sub _ip_arp($self) {
# my @sys_virt_version = split('\.', $Sys::Virt::VERSION);
# return undef if ($sys_virt_version[0] < 5);
# my @ip;
# eval " @ip = $self->domain->get_interface_addresses(Sys::Virt::Domain::INTERFACE_ADDRESSES_SRC_ARP); ";
# return @ip;
#}
sub ip($self) {
my @ip;
......@@ -1654,7 +1654,7 @@ sub ip($self) {
warn $@ if $@;
return $ip[0]->{addrs}->[0]->{addr} if $ip[0];
@ip = $self->_ip_arp();
# @ip = $self->_ip_arp();
return $ip[0]->{addrs}->[0]->{addr} if $ip[0];
return $self->_ip_agent();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment