File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -72,14 +72,17 @@ def _create_dir(location):
7272# current installation location. This is where the source code and static data
7373# lives.
7474
75-
75+ # in case package is not installed or we do not have setutools/pkg_resources
76+ # on hand fall back to this version
77+ __version__ = '21.3.31'
7678try :
7779 from pkg_resources import get_distribution , DistributionNotFound
78- __version__ = get_distribution ('scancode-toolkit' ).version
79- except (DistributionNotFound , ImportError ):
80- # package is not installed or we do not have setutools/pkg_resources
81- # on hand
82- __version__ = '21.3.31'
80+ try :
81+ __version__ = get_distribution ('scancode-toolkit' ).version
82+ except DistributionNotFound :
83+ pass
84+ except ImportError :
85+ pass
8386
8487system_temp_dir = tempfile .gettempdir ()
8588scancode_src_dir = dirname (__file__ )
You can’t perform that action at this time.
0 commit comments