This could be as simple as this: --- dput/methods/http.py | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/dput/methods/http.py b/dput/methods/http.py index 5bd0fe7..40acdc1 100644 --- a/dput/methods/http.py +++ b/dput/methods/http.py @@ -160,6 +160,11 @@ def upload( else: sys.stdout.write( "Upload failed: %d %s\n" % (res.status, res.reason)) + error_message = res.read() + if error_message != "": + sys.stdout.write( + "http error message: %s\n" % error_message + ) sys.exit(1) # must be done, but we're not interested res.read() -- 2.17.0 We can also only display the message in debug mode if you want. -- Alexandre Viau av...@debian.org
signature.asc
Description: OpenPGP digital signature