ceph / merfi

Finds and signs files with different signing tools (gpg, rpm-sign)
MIT License
3 stars 3 forks source link

RpmSign: format strings for merfi.logger #64

Closed ktdreyer closed 7 years ago

ktdreyer commented 7 years ago

When rpm-sign failed and we entered the failure-checking code path, we hit a TypeError for merfi.logger:

File "merfi/backends/rpm_sign.py", line 85, in sign
  self.sign_release(path)
File "merfi/backends/rpm_sign.py", line 115, in sign_release
  self.clear_sign(path, clearsign)
File "merfi/backends/rpm_sign.py", line 44, in clear_sign
  logger.error('stderr: %s', line)
TypeError: error() takes exactly 1 argument (2 given)

merfi's custom logger class expects a single "message" argument. Format the error message strings before passing to the logger.