From 8346fbea527a3783b499f5954d1767822c9cb1e8 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Thu, 2 Dec 2021 15:00:04 +0100 Subject: [PATCH] Catch all exceptions from pbr when importing the root package Apparently, pbr can raise a generic exception. Sigh. Change-Id: Ib11494769fa42516c953a7efa782515875b0e32b --- bifrost/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bifrost/__init__.py b/bifrost/__init__.py index 3a68a217c..59b1ed754 100644 --- a/bifrost/__init__.py +++ b/bifrost/__init__.py @@ -17,8 +17,8 @@ try: __version__ = pbr.version.VersionInfo( 'bifrost').version_string() -except ImportError: - pass # Allow the CLI to work without pbr installed +except Exception: + pass # Allow the CLI to work without pbr installed or with it failing __all__ = [ 'inventory'