diff options
| author | Michael Vogt <mvo@ubuntu.com> | 2018-05-10 10:22:35 +0200 |
|---|---|---|
| committer | Michael Vogt <mvo@ubuntu.com> | 2018-05-10 10:22:35 +0200 |
| commit | 79242f8531a9790e307cc3ea33acbd1594ff58e1 (patch) | |
| tree | 2bfcff11c72ceac1e08a9f18fe3dfb8e6f01882e | |
| parent | 7cb2b2dc4144308a1ca22ce54f8a460114b1e13b (diff) | |
address review feedback from Gustavo (many thanks)snapd-seeded
| -rw-r--r-- | client/client.go | 2 | ||||
| -rw-r--r-- | cmd/snap/cmd_wait.go | 17 | ||||
| -rw-r--r-- | daemon/api_test.go | 2 | ||||
| -rw-r--r-- | daemon/response.go | 2 |
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{} |
