From 66b44b8f34ea09c912a6e5e97696d2e5758af218 Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Tue, 17 May 2022 10:34:57 -0400 Subject: [PATCH] pylint: ignore __original_module_threading errors Our cmd tools all use the same import pattern here. Instruct pylint to ignore E0401 errors on this. Change-Id: I2c610cb0dac55afb17070c99501b4bdf6912ad19 --- cinder/cmd/api.py | 2 +- cinder/cmd/backup.py | 2 +- cinder/cmd/scheduler.py | 2 +- cinder/cmd/volume.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cinder/cmd/api.py b/cinder/cmd/api.py index 4820f0d5828..5eae465c2bb 100644 --- a/cinder/cmd/api.py +++ b/cinder/cmd/api.py @@ -25,7 +25,7 @@ eventlet.monkey_patch() # Monkey patch the original current_thread to use the up-to-date _active # global variable. See https://bugs.launchpad.net/bugs/1863021 and # https://github.com/eventlet/eventlet/issues/592 -import __original_module_threading as orig_threading +import __original_module_threading as orig_threading # pylint: disable=E0401 import threading # noqa orig_threading.current_thread.__globals__['_active'] = threading._active diff --git a/cinder/cmd/backup.py b/cinder/cmd/backup.py index 059f70c2fdf..1692d93f2db 100644 --- a/cinder/cmd/backup.py +++ b/cinder/cmd/backup.py @@ -30,7 +30,7 @@ eventlet.monkey_patch() # Monkey patch the original current_thread to use the up-to-date _active # global variable. See https://bugs.launchpad.net/bugs/1863021 and # https://github.com/eventlet/eventlet/issues/592 -import __original_module_threading as orig_threading +import __original_module_threading as orig_threading # pylint: disable=E0401 import threading # noqa orig_threading.current_thread.__globals__['_active'] = threading._active diff --git a/cinder/cmd/scheduler.py b/cinder/cmd/scheduler.py index 45e6f873a47..5dbe1c57d8b 100644 --- a/cinder/cmd/scheduler.py +++ b/cinder/cmd/scheduler.py @@ -25,7 +25,7 @@ eventlet.monkey_patch() # Monkey patch the original current_thread to use the up-to-date _active # global variable. See https://bugs.launchpad.net/bugs/1863021 and # https://github.com/eventlet/eventlet/issues/592 -import __original_module_threading as orig_threading +import __original_module_threading as orig_threading # pylint: disable=E0401 import threading # noqa orig_threading.current_thread.__globals__['_active'] = threading._active diff --git a/cinder/cmd/volume.py b/cinder/cmd/volume.py index 6e3c4a8314c..4fae53d3e57 100644 --- a/cinder/cmd/volume.py +++ b/cinder/cmd/volume.py @@ -36,7 +36,7 @@ else: # Monkey patch the original current_thread to use the up-to-date _active # global variable. See https://bugs.launchpad.net/bugs/1863021 and # https://github.com/eventlet/eventlet/issues/592 -import __original_module_threading as orig_threading +import __original_module_threading as orig_threading # pylint: disable=E0401 import threading # noqa orig_threading.current_thread.__globals__['_active'] = threading._active