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

Unified Diff: state/state.go

Issue 6622047: state: make SetAdminPassword("") idempotent
Patch Set: state: make SetAdminPassword("") idempotent Created 12 years, 6 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') | state/state_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: state/state.go
=== modified file 'state/state.go'
--- state/state.go 2012-10-04 14:14:34 +0000
+++ state/state.go 2012-10-05 16:43:25 +0000
@@ -551,7 +551,7 @@
return fmt.Errorf("cannot login after setting password: %v", err)
}
} else {
- if err := admin.RemoveUser("admin"); err != nil {
+ if err := admin.RemoveUser("admin"); err != nil && err != mgo.ErrNotFound {
return fmt.Errorf("cannot remove admin user: %v", err)
}
}
« no previous file with comments | « [revision details] ('k') | state/state_test.go » ('j') | no next file with comments »

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