maintner: suppress spurious error message

Currently maintnerd prints

    2017/06/17 15:00:16 Unknown error type <nil>: <nil>

if it successfully downloads a file. It shouldn't log if there was no
error.

Change-Id: I01c4f2bde616d709d5c081219f9c123d6ea6a678
Reviewed-on: https://go-review.googlesource.com/46007
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Kevin Burke 2017-06-17 15:20:39 -07:00 коммит произвёл Brad Fitzpatrick
Родитель 07714b07ce
Коммит 9fb5d0849b
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -74,6 +74,9 @@ func (ns *netMutSource) GetMutations(ctx context.Context) <-chan MutationStreamE
// isNoInternetError reports whether the provided error is because there's no
// network connectivity.
func isNoInternetError(err error) bool {
if err == nil {
return false
}
switch err := err.(type) {
case *url.Error:
return isNoInternetError(err.Err)