Skip to content

Commit

Permalink
Update lookup.go
Browse files Browse the repository at this point in the history
  • Loading branch information
tvi authored Jul 27, 2017
1 parent ff9720c commit 3a8cbde
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ func toPeerInfos(ps []peer.ID) []*pstore.PeerInfo {
}

func loggableKey(k string) logging.LoggableMap {
if cid, err := cid.Cast([]byte(k)); err == nil {
cid, err := cid.Cast([]byte(k))
if err != nil {
log.Errorf("loggableKey could not cast key: %v", err)
} else {
k = cid.String()
}
return logging.LoggableMap{
Expand Down

0 comments on commit 3a8cbde

Please sign in to comment.