From e6e6a957d176dafaecfda49cce2bea26d90c523d Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Mon, 7 Jul 2014 15:12:56 +0000 Subject: [PATCH] This could be either kind of error. --- roles/fedmsg/base/templates/base.py.j2 | 2 +- roles/fedmsg/base/templates/logging.py.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/fedmsg/base/templates/base.py.j2 b/roles/fedmsg/base/templates/base.py.j2 index ab7bd9b265..2d1e69b768 100644 --- a/roles/fedmsg/base/templates/base.py.j2 +++ b/roles/fedmsg/base/templates/base.py.j2 @@ -55,7 +55,7 @@ try: config['moksha.monitoring.socket'] = \ 'ipc:///var/run/fedmsg/monitoring-%s.socket' % proc.name -except OSError: +except (OSError, ImportError): # We run into issues when trying to import psutil from mod_wsgi on rhel7 # but this feature is of no concern in that context, so just fail quietly. # https://github.com/jmflinuxtx/kerneltest-harness/pull/17#issuecomment-48007837 diff --git a/roles/fedmsg/base/templates/logging.py.j2 b/roles/fedmsg/base/templates/logging.py.j2 index 5cc65aa6b2..027d032afd 100644 --- a/roles/fedmsg/base/templates/logging.py.j2 +++ b/roles/fedmsg/base/templates/logging.py.j2 @@ -10,7 +10,7 @@ import traceback psutil = None try: import psutil -except OSError: +except (OSError, ImportError): # We run into issues when trying to import psutil from inside mod_wsgi on # rhel7. If we hit that here, then just fail quietly. # https://github.com/jmflinuxtx/kerneltest-harness/pull/17#issuecomment-48007837