~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/poppy/twistedftp.py

  • Committer: Julian Edwards
  • Date: 2011-12-06 17:34:36 UTC
  • mto: This revision was merged to the branch mainline in revision 14492.
  • Revision ID: julian.edwards@canonical.com-20111206173436-2a1brfr9uh2h9j22
Make poppy FTP handler write debug output to the log when there's a gpg verification error.

Show diffs side-by-side

added added

removed removed

Lines of Context:
167
167
            sig = getUtility(IGPGHandler).getVerifiedSignatureResilient(
168
168
                file(signed_file, "rb").read())
169
169
        except GPGVerificationError, error:
 
170
            log = logging.getLogger("poppy-sftp")
 
171
            log.info("GPGVerificationError, extra debug output follows:")
 
172
            for attr in ("args", "code", "signatures", "source"):
 
173
                if hasattr(error, attr):
 
174
                    log.info("%s: %s" % (attr, error.attr))
170
175
            return ("Changes file must be signed with a valid GPG "
171
176
                    "signature: %s" % error)
172
177