mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
set default for getattr
This commit is contained in:
parent
ec79ad45ec
commit
1da9cdc84d
@ -128,7 +128,7 @@ def _get_virtual():
|
||||
if 'pkg._get_virtual' not in __context__:
|
||||
__context__['pkg._get_virtual'] = {}
|
||||
apt_cache = apt.cache.Cache()
|
||||
pkgs = getattr(apt_cache._cache, 'packages')
|
||||
pkgs = getattr(apt_cache._cache, 'packages', [])
|
||||
for pkg in pkgs:
|
||||
if pkg.provides_list:
|
||||
for item in pkg.provides_list:
|
||||
|
Loading…
Reference in New Issue
Block a user