[gnome-boxes] Remove a redundant check
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Remove a redundant check
- Date: Thu, 5 Jul 2012 13:38:41 +0000 (UTC)
commit d6f048bba211723d1084eb49d0ecdc6d3c828a08
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Jul 5 05:20:21 2012 +0300
Remove a redundant check
We don't need to check if machine is running before stopping it, libvirt
will take care of that:
http://libvirt.org/html/libvirt-libvirt.html#virDomainDestroy
https://bugzilla.gnome.org/show_bug.cgi?id=679429
src/libvirt-machine.vala | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index 1e9e8cf..3c2e460 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -405,8 +405,7 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
debug ("Force shutdown '%s'..", name);
try {
- if (is_running ())
- domain.stop (0);
+ domain.stop (0);
} catch (GLib.Error error) {
warning ("Failed to shutdown '%s': %s", domain.get_name (), error.message);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]