testbot/VMs: Fix _GetSnapshot() to report an error when given a nonexistent snapshot.

Francois Gouget fgouget at codeweavers.com
Tue Mar 26 04:55:28 CDT 2013


---
 testbot/lib/WineTestBot/VMs.pm |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/testbot/lib/WineTestBot/VMs.pm b/testbot/lib/WineTestBot/VMs.pm
index fd064a1..4109b7f 100644
--- a/testbot/lib/WineTestBot/VMs.pm
+++ b/testbot/lib/WineTestBot/VMs.pm
@@ -287,9 +287,8 @@ sub _GetSnapshot($$)
         last;
       }
     }
-    $@ = "Snapshot '$SnapshotName' not found" if (!$Snapshot);
   };
-  return ($@->message(), undef, undef) if ($@);
+  return ("Snapshot '$SnapshotName' not found", undef, undef) if (!defined $Snapshot);
   return (undef, $Domain, $Snapshot);
 }
 
-- 
1.7.10.4




More information about the wine-patches mailing list