diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-05-07 00:11:15 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-05-07 00:11:15 (GMT) |
commit | 8b93bf13774108feaca0d63df9e8f90fbd105a93 (patch) | |
tree | 9a639d183dd37da5c901508d16cf9cdc51f769f7 | |
parent | 66ea4919ea172c126ea11d65441f7707d9e2cdac (diff) |
print cancel message after curl perform returned
-rw-r--r-- | rhimport/fetcher.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rhimport/fetcher.go b/rhimport/fetcher.go index b248483..fc75460 100644 --- a/rhimport/fetcher.go +++ b/rhimport/fetcher.go @@ -106,7 +106,6 @@ func curlProgressCallback(dltotal, dlnow, ultotal, ulnow float64, userdata inter } if data.ctx.Cancel != nil && len(data.ctx.Cancel) > 0 { - rhl.Printf("downloading '%s' got canceled", data.ctx.SourceUri) data.res.ResponseCode = http.StatusNoContent data.res.ErrorString = "canceled" return false @@ -157,6 +156,7 @@ func fetchFileCurl(ctx *Context, res *Result, uri *url.URL) (err error) { os.Remove(path.Dir(cbdata.filename)) } if res.ResponseCode == http.StatusNoContent { + rhl.Printf("download of '%s' got canceled", ctx.SourceUri) return nil } if cbdata.writeError != nil { @@ -262,6 +262,7 @@ func fetchFileArchiv(ctx *Context, res *Result, uri *url.URL) (err error) { os.Remove(path.Dir(cbdata.filename)) } if res.ResponseCode == http.StatusNoContent { + rhl.Printf("download of '%s' got canceled", ctx.SourceUri) return nil } if cbdata.writeError != nil { |