Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2)

Unified Diff: environs/dummy/environs.go

Issue 6653050: environs, juju: require admin-secret
Patch Set: environs, juju: require admin-secret Created 12 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « [revision details] ('k') | environs/dummy/environs_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: environs/dummy/environs.go
=== modified file 'environs/dummy/environs.go'
--- environs/dummy/environs.go 2012-10-15 14:42:04 +0000
+++ environs/dummy/environs.go 2012-10-16 17:27:11 +0000
@@ -379,6 +379,10 @@
if err := e.checkBroken("Bootstrap"); err != nil {
return err
}
+ password := e.Config().AdminSecret()
+ if password == "" {
+ return fmt.Errorf("admin-secret is required for bootstrap")
+ }
var tools *state.Tools
var err error
if uploadTools {
@@ -409,10 +413,8 @@
if err != nil {
panic(err)
}
- if password := e.Config().AdminSecret(); password != "" {
- if err := st.SetAdminPassword(trivial.PasswordHash(password)); err != nil {
- return err
- }
+ if err := st.SetAdminPassword(trivial.PasswordHash(password)); err != nil {
+ return err
}
if err := st.Close(); err != nil {
panic(err)
« no previous file with comments | « [revision details] ('k') | environs/dummy/environs_test.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b