summaryrefslogtreecommitdiff
diff options
-rw-r--r--client/client.go2
-rw-r--r--cmd/snap/cmd_wait.go17
-rw-r--r--daemon/api_test.go2
-rw-r--r--daemon/response.go2
4 files changed, 17 insertions, 6 deletions
diff --git a/client/client.go b/client/client.go
index 2c82c3e587..c447a60a7c 100644
--- a/client/client.go
+++ b/client/client.go
@@ -384,7 +384,7 @@ const (
ErrorKindNetworkTimeout = "network-timeout"
ErrorKindInterfacesUnchanged = "interfaces-unchanged"
- ErrorKindConfigNoSuchOption = "config-no-such-option"
+ ErrorKindConfigNoSuchOption = "option-not-found"
)
// IsTwoFactorError returns whether the given error is due to problems
diff --git a/cmd/snap/cmd_wait.go b/cmd/snap/cmd_wait.go
index ab0d7f1184..e56a0a11f0 100644
--- a/cmd/snap/cmd_wait.go
+++ b/cmd/snap/cmd_wait.go
@@ -46,9 +46,8 @@ func init() {
{
name: "<snap>",
// TRANSLATORS: This should probably not start with a lowercase letter.
- desc: i18n.G("The snap whose conf is being requested"),
- },
- {
+ desc: i18n.G("The snap for which configuration will be checked"),
+ }, {
// TRANSLATORS: This needs to be wrapped in <>s.
name: i18n.G("<key>"),
// TRANSLATORS: This should probably not start with a lowercase letter.
@@ -76,6 +75,18 @@ func trueish(vi interface{}) bool {
if v > 0 {
return true
}
+ case int64:
+ if v > 0 {
+ return true
+ }
+ case float32:
+ if v > 0 {
+ return true
+ }
+ case float64:
+ if v > 0 {
+ return true
+ }
case json.Number:
if i, err := v.Int64(); err == nil && i > 0 {
return true
diff --git a/daemon/api_test.go b/daemon/api_test.go
index 8ebb84279a..b8dfd71d30 100644
--- a/daemon/api_test.go
+++ b/daemon/api_test.go
@@ -2610,7 +2610,7 @@ func (s *apiSuite) TestGetConfMissingKey(c *check.C) {
"Key": "test-key2",
},
"message": `snap "test-snap" has no "test-key2" configuration option`,
- "kind": "config-no-such-option",
+ "kind": "option-not-found",
})
}
diff --git a/daemon/response.go b/daemon/response.go
index a9fe04e2c4..a944c3991e 100644
--- a/daemon/response.go
+++ b/daemon/response.go
@@ -150,7 +150,7 @@ const (
errorKindNetworkTimeout = errorKind("network-timeout")
errorKindInterfacesUnchanged = errorKind("interfaces-unchanged")
- errorKindConfigNoSuchOption = errorKind("config-no-such-option")
+ errorKindConfigNoSuchOption = errorKind("option-not-found")
)
type errorValue interface{}