chiark / gitweb /
handle exceptions that send a tuple for the error message
authorHans-Christoph Steiner <hans@eds.org>
Wed, 27 Sep 2017 15:35:51 +0000 (17:35 +0200)
committerHans-Christoph Steiner <hans@eds.org>
Fri, 13 Oct 2017 12:58:15 +0000 (14:58 +0200)
commita4c4a16ed9a600b09ff7b62d78eaceb377cf3a9c
tree1ddfc0361abdaff5476e791a63d1189c0846d7cc
parent53ce81179c2edbad306e3a0a6f7569430555e168
handle exceptions that send a tuple for the error message

Running `fdroid verify` I was seeing FDroidExceptions from verify.py:98
that had a tuple rather than a string.

Traceback (most recent call last):
  File "/home/hans/code/fdroid/server/fdroid", line 152, in <module>
    main()
  File "/home/hans/code/fdroid/server/fdroid", line 128, in main
    mod.main()
  File "/home/hans/code/fdroid/server/fdroidserver/verify.py", line 98, in main
    logging.info("...NOT verified - {0}".format(e))
  File "/home/hans/code/fdroid/server/fdroidserver/exception.py", line 22, in __str__
    ret += "\n==== detail begin ====\n%s\n==== detail end ====" % ''.join(self.detail).strip()
TypeError: sequence item 1: expected str instance, HTTPError found
fdroidserver/exception.py