Module: tools Branch: master Commit: f82c4e5293766e926c8b1bde2e353d58ab13d902 URL: http://source.winehq.org/git/tools.git/?a=commit;h=f82c4e5293766e926c8b1bde2...
Author: Francois Gouget fgouget@codeweavers.com Date: Wed May 7 16:36:17 2014 +0200
testbot/VMs: Catch the Libvirt exceptions in IsPoweredOn().
---
testbot/lib/WineTestBot/VMs.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/testbot/lib/WineTestBot/VMs.pm b/testbot/lib/WineTestBot/VMs.pm index 1cf1a42..0aa06eb 100644 --- a/testbot/lib/WineTestBot/VMs.pm +++ b/testbot/lib/WineTestBot/VMs.pm @@ -352,7 +352,10 @@ sub IsPoweredOn($)
my ($ErrMessage, $Domain) = $self->_GetDomain(); return undef if (defined $ErrMessage); - return $Domain->is_active(); + my $IsActive; + eval { $IsActive = $Domain->is_active() }; + return undef if ($@); + return $IsActive; }
sub PowerOn