File: avoid-pifpaf.patch

package info (click to toggle)
python-oslo.messaging 5.10.0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,904 kB
  • ctags: 3,444
  • sloc: python: 19,334; sh: 361; makefile: 22
file content (22 lines) | stat: -rw-r--r-- 679 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: Avoid use of pifpaf
 pifpaf is only used for directly control of RabbitMQ in upstream
 functional testing, and is not packaged in Debian or Ubuntu.
 .
 Don't error on import if its not found.
Author: James Page <james.page@ubuntu.com>
Forwarded: not-needed

--- a/oslo_messaging/tests/functional/test_rabbitmq.py
+++ b/oslo_messaging/tests/functional/test_rabbitmq.py
@@ -16,7 +16,10 @@ import signal
 import time
 
 import fixtures
-from pifpaf.drivers import rabbitmq
+try:
+    from pifpaf.drivers import rabbitmq
+except ImportError:
+    rabbitmq = None
 
 from oslo_messaging.tests.functional import utils
 from oslo_messaging.tests import utils as test_utils