diff options
| author | Adam Young <ayoung@redhat.com> | 2013-07-22 13:50:46 -0400 |
|---|---|---|
| committer | Adam Young <ayoung@redhat.com> | 2013-07-26 20:45:47 -0400 |
| commit | 2bb6137f48b7516a6870dd86700d09d8aa977caf (patch) | |
| tree | fafcae3fc87cd108fe4be7307b0c4735bd1cc81d /keystoneclient/common | |
| parent | fd8f05350b7bf07d8505100d400ca77892236ed9 (diff) | |
| download | python-keystoneclient-2bb6137f48b7516a6870dd86700d09d8aa977caf.tar.gz | |
no logging on cms failure
Don't log in the keystoneclient.common.cms as there are some errors
that are expected. Instead, log in the middleware
bug 1189539
Change-Id: I1e80e2ab35e073d9b8d25fd16b31c64c34cd001d
Diffstat (limited to 'keystoneclient/common')
| -rw-r--r-- | keystoneclient/common/cms.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/keystoneclient/common/cms.py b/keystoneclient/common/cms.py index 26f9795..e07dbcf 100644 --- a/keystoneclient/common/cms.py +++ b/keystoneclient/common/cms.py @@ -25,7 +25,10 @@ def _ensure_subprocess(): def cms_verify(formatted, signing_cert_file_name, ca_file_name): - """Verifies the signature of the contents IAW CMS syntax.""" + """Verifies the signature of the contents IAW CMS syntax. + + :raises: subprocess.CalledProcessError + """ _ensure_subprocess() process = subprocess.Popen(["openssl", "cms", "-verify", "-certfile", signing_cert_file_name, @@ -39,7 +42,8 @@ def cms_verify(formatted, signing_cert_file_name, ca_file_name): output, err = process.communicate(formatted) retcode = process.poll() if retcode: - LOG.warning('Verify error: %s' % err) + # Do not log errors, as some happen in the positive thread + # instead, catch them in the calling code and log them there. # NOTE(dmllr): Python 2.6 compatibility: # CalledProcessError did not have output keyword argument e = subprocess.CalledProcessError(retcode, "openssl") |
