Skip to content

Commit

Permalink
Merge pull request canonical#1082 from stgraber/master
Browse files Browse the repository at this point in the history
Bugfixes
  • Loading branch information
mikemccracken committed Sep 6, 2015
2 parents 0c02146 + 2dffc39 commit 648e853
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
4 changes: 4 additions & 0 deletions client.go
Expand Up @@ -1041,6 +1041,10 @@ func (c *Client) Init(name string, imgremote string, image string, profiles *[]s

source := shared.Jmap{"type": "image"}

if image == "" {
return nil, fmt.Errorf(gettext.Gettext("You must provide an image hash or alias name."))
}

if imgremote != c.name {
source["type"] = "image"
source["mode"] = "pull"
Expand Down
5 changes: 5 additions & 0 deletions lxd/daemon.go
Expand Up @@ -961,6 +961,11 @@ func (d *Daemon) PasswordCheck(password string) bool {
return false
}

// No password set
if value == "" {
return false
}

buff, err := hex.DecodeString(value)
if err != nil {
shared.Log.Error("hex decode failed", log.Ctx{"err": err})
Expand Down
26 changes: 15 additions & 11 deletions po/lxd.pot
Expand Up @@ -7,7 +7,7 @@
msgid ""
msgstr "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-09-04 18:08-0400\n"
"POT-Creation-Date: 2015-09-05 21:08-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -97,7 +97,7 @@ msgstr ""
msgid "Bad image property: %s\n"
msgstr ""

#: client.go:1656
#: client.go:1660
msgid "Cannot change profile name"
msgstr ""

Expand Down Expand Up @@ -183,7 +183,7 @@ msgstr ""
msgid "Ephemeral container"
msgstr ""

#: client.go:593 client.go:603 client.go:850 client.go:1877
#: client.go:593 client.go:603 client.go:850 client.go:1881
#, c-format
msgid "Error adding alias %s\n"
msgstr ""
Expand Down Expand Up @@ -622,7 +622,7 @@ msgstr ""
msgid "Stopping container failed!"
msgstr ""

#: client.go:1063 client.go:1101
#: client.go:1067 client.go:1105
msgid "The image architecture is incompatible with the target server"
msgstr ""

Expand Down Expand Up @@ -687,6 +687,10 @@ msgstr ""
msgid "YAML parse error %v\n"
msgstr ""

#: client.go:1045
msgid "You must provide an image hash or alias name."
msgstr ""

#: client.go:482
msgid "api version mismatch: mine: %q, daemon: %q"
msgstr ""
Expand All @@ -695,7 +699,7 @@ msgstr ""
msgid "bad number of things scanned from image, container or snapshot"
msgstr ""

#: client.go:1687
#: client.go:1691
#, c-format
msgid "bad profile url %s"
msgstr ""
Expand All @@ -704,15 +708,15 @@ msgstr ""
msgid "bad result type from action"
msgstr ""

#: client.go:1691
#: client.go:1695
msgid "bad version in profile url"
msgstr ""

#: lxc/copy.go:77
msgid "can't copy to the same container name"
msgstr ""

#: client.go:1097
#: client.go:1101
#, c-format
msgid "can't get info for image '%s': %s"
msgstr ""
Expand All @@ -721,7 +725,7 @@ msgstr ""
msgid "cannot resolve unix socket address: %v"
msgstr ""

#: client.go:1740 client.go:1797
#: client.go:1744 client.go:1801
msgid "device already exists\n"
msgstr ""

Expand All @@ -748,7 +752,7 @@ msgstr ""
msgid "expected error, got %s"
msgstr ""

#: client.go:1301
#: client.go:1305
#, c-format
msgid "got bad op status %s"
msgstr ""
Expand All @@ -767,7 +771,7 @@ msgstr ""
msgid "invalid argument %s"
msgstr ""

#: client.go:1464
#: client.go:1468
#, c-format
msgid "invalid wait url %s"
msgstr ""
Expand All @@ -776,7 +780,7 @@ msgstr ""
msgid "no response!"
msgstr ""

#: client.go:1733 client.go:1790
#: client.go:1737 client.go:1794
msgid "no value found in %q\n"
msgstr ""

Expand Down

0 comments on commit 648e853

Please sign in to comment.