testbot/VMs: Catch the Libvirt exceptions in IsPoweredOn().

Francois Gouget fgouget at codeweavers.com
Wed May 7 09:36:17 CDT 2014


---
 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
-- 
2.0.0.rc0



More information about the wine-patches mailing list