The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/1578
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Closes #1577 Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com>
From f83b583e37097bb1e95c52e0dfcfdbdfed7b53c6 Mon Sep 17 00:00:00 2001 From: Tycho Andersen <tycho.ander...@canonical.com> Date: Tue, 9 Feb 2016 08:32:34 -0700 Subject: [PATCH] only print profile applied message on success Closes #1577 Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com> --- lxc/profile.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lxc/profile.go b/lxc/profile.go index 8357733..f86a421 100644 --- a/lxc/profile.go +++ b/lxc/profile.go @@ -211,15 +211,19 @@ func doProfileDelete(client *lxd.Client, p string) error { func doProfileApply(client *lxd.Client, c string, p string) error { resp, err := client.ApplyProfile(c, p) + if err != nil { + return err + } + + err = client.WaitForSuccess(resp.Operation) if err == nil { if p == "" { p = i18n.G("(none)") } fmt.Printf(i18n.G("Profile %s applied to %s")+"\n", p, c) - } else { - return err } - return client.WaitForSuccess(resp.Operation) + + return err } func doProfileShow(client *lxd.Client, p string) error {
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel