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

Unified Diff: worker/firewaller/firewaller.go

Issue 7314116: state/api: use error codes
Patch Set: state/api: use error codes Created 12 years, 1 month 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 | « state/unit.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: worker/firewaller/firewaller.go
=== modified file 'worker/firewaller/firewaller.go'
--- worker/firewaller/firewaller.go 2013-02-19 11:43:12 +0000
+++ worker/firewaller/firewaller.go 2013-02-20 17:13:17 +0000
@@ -316,10 +316,8 @@
machineId, err = unit.AssignedMachineId()
if state.IsNotFound(err) {
continue
- } else if err != nil {
- if _, ok := err.(*state.NotAssignedError); !ok {
- return err
- }
+ } else if err != nil && !state.IsNotAssigned(err) {
+ return err
}
}
if unitd, known := fw.unitds[name]; known {
« no previous file with comments | « state/unit.go ('k') | no next file » | no next file with comments »

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