Package: dput
Verseion: 0.9.2.32
Severity: important
Tags: patch

Hi,

When an HTTP upload fails, dput tries to show information as to why it
failed, but there is a syntax error in http.py and a traceback is shown:

    Traceback (most recent call last):
      File "/usr/bin/dput", line 919, in <module>
        main()
      File "/usr/bin/dput", line 881, in main
        files_to_upload, debug, 0, progress=progress)
      File "/usr/share/dput/http.py", line 123, in upload
        print "Upload failed: %d %d"%res.status, res.reason
    TypeError: not enough arguments for format string

I attach a patch to fix this trivial problem.

Thanks,

-- 
Jonny Lamb, UK                                   [EMAIL PROTECTED]
http://jonnylamb.com                                     GPG: 0x2E039402
diff -Nruad -Nruad dput-0.9.2.32.orig/http.py dput-0.9.2.32/http.py
--- dput-0.9.2.32.orig/http.py  2008-06-16 19:56:34.000000000 +0100
+++ dput-0.9.2.32/http.py       2008-06-16 19:56:49.000000000 +0100
@@ -120,6 +120,6 @@
            print "Upload failed as unauthorized: %s"%res.reason
            print "  Maybe wrong username or password?"
          else:
-           print "Upload failed: %d %d"%res.status, res.reason
+           print "Upload failed: %d %d"% (res.status, res.reason)
          sys.exit(1)
        res.read() # must be done, but we're not interested

Attachment: signature.asc
Description: Digital signature

Reply via email to