aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Magorsch <arzano@gentoo.org>2020-06-19 18:46:36 +0200
committerMax Magorsch <arzano@gentoo.org>2020-06-19 18:46:36 +0200
commit74c590d727a972fa051d6cd15cbbc2ffe4451e8a (patch)
tree075a59e3c791ca2d495e064dd59c7efb3f7358a5 /pkg/importer
parentSpeed up the /lists page (diff)
downloadarchives-74c590d727a972fa051d6cd15cbbc2ffe4451e8a.tar.gz
archives-74c590d727a972fa051d6cd15cbbc2ffe4451e8a.tar.bz2
archives-74c590d727a972fa051d6cd15cbbc2ffe4451e8a.zip
Don't abort when parsing the body fails
Signed-off-by: Max Magorsch <arzano@gentoo.org>
Diffstat (limited to 'pkg/importer')
-rw-r--r--pkg/importer/utils.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/importer/utils.go b/pkg/importer/utils.go
index 1af34ed..2fe73e8 100644
--- a/pkg/importer/utils.go
+++ b/pkg/importer/utils.go
@@ -7,7 +7,6 @@ import (
"fmt"
"io"
"io/ioutil"
- "log"
"mime/multipart"
"net/mail"
"os"
@@ -75,7 +74,8 @@ func getBodyParts(body io.Reader, boundary string) map[string]string {
}
slurp, err := ioutil.ReadAll(p)
if err != nil {
- log.Fatal(err)
+ fmt.Println("Error while reading the body:")
+ fmt.Println(err)
}
bodyParts[p.Header.Get("Content-Type")] = string(slurp)
}