summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/bookpipeline/main.go2
-rw-r--r--graph.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/cmd/bookpipeline/main.go b/cmd/bookpipeline/main.go
index f7c2ae9..6687329 100644
--- a/cmd/bookpipeline/main.go
+++ b/cmd/bookpipeline/main.go
@@ -373,7 +373,7 @@ func analyse(conn Pipeliner) func(chan string, chan string, chan error, *log.Log
}
defer f.Close()
err = bookpipeline.Graph(bestconfs, filepath.Base(savedir), f)
- if err != nil {
+ if err != nil && err.Error() != "Not enough valid confidences" {
close(up)
errc <- errors.New(fmt.Sprintf("Error rendering graph: %s", err))
return
diff --git a/graph.go b/graph.go
index c56ba48..4ca44a7 100644
--- a/graph.go
+++ b/graph.go
@@ -51,8 +51,8 @@ func Graph(confs map[string]*Conf, bookname string, w io.Writer) error {
}
func GraphOpts(confs map[string]*Conf, bookname string, xaxis string, guidelines bool, w io.Writer) error {
- if len(confs) == 0 {
- return errors.New("No valid confidences")
+ if len(confs) < 2 {
+ return errors.New("Not enough valid confidences")
}
// Organise confs to sort them by page