Ver Fonte

subnet/etcdv2: Fix panic from bad error contruction

Fixes #657
Tom Denham há 8 anos atrás
pai
commit
5d733f0273
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      subnet/etcdv2/registry.go

+ 1 - 1
subnet/etcdv2/registry.go

@@ -397,7 +397,7 @@ func (esr *etcdSubnetRegistry) parseNetworkKey(s string) (string, bool) {
 func nodeToLease(node *etcd.Node) (*Lease, error) {
 	sn := ParseSubnetKey(node.Key)
 	if sn == nil {
-		return nil, fmt.Errorf("failed to parse subnet key %q", *sn)
+		return nil, fmt.Errorf("failed to parse subnet key %s", node.Key)
 	}
 
 	attrs := &LeaseAttrs{}