diff options
author | Zeeshan Ali (Khattak) <zeeshanak@gnome.org> | 2012-07-05 05:20:21 +0300 |
---|---|---|
committer | Zeeshan Ali (Khattak) <zeeshanak@gnome.org> | 2012-07-05 16:38:20 +0300 |
commit | d6f048bba211723d1084eb49d0ecdc6d3c828a08 (patch) | |
tree | f03b38f0acdfa68d8b104b8070f26e33b29232eb | |
parent | 2eade9a295342687e87ae4e2db0d66588bff4665 (diff) |
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
-rw-r--r-- | 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); } |