Fix ImportWarning during importing a module

Set warnings category to filter only DeprecationWarnings
and UserWarning

Closes-Bug: #1889380
Signed-off-by: Yadnesh Kulkarni <ykulkarn@redhat.com>
Change-Id: I8616775584cf0216314109d21dabd32635293a27
(cherry picked from commit c296d83eaa)
This commit is contained in:
Yadnesh Kulkarni 2020-12-17 20:02:44 +05:30 committed by Alex Schultz
parent 9a4744e110
commit 697a5e6be3
1 changed files with 2 additions and 1 deletions

View File

@ -33,7 +33,8 @@ from tripleo_common.utils import tarball
LOG = logging.getLogger(__name__)
warnings.filterwarnings('once')
warnings.filterwarnings('once', category=DeprecationWarning)
warnings.filterwarnings('once', category=UserWarning)
class Config(object):