Skip to content

Commit 028ed9a

Browse files
committed
fixed recursive module resolution
Signed-off-by: Zen <[email protected]>
1 parent c1d9011 commit 028ed9a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

ugrd/kmod/kmod.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__author__ = 'desultory'
2-
__version__ = '0.7.0'
2+
__version__ = '0.7.1'
33

44
from pathlib import Path
55

@@ -77,10 +77,14 @@ def _get_kmod_info(self, module: str):
7777
module_info = {}
7878

7979
for line in cmd.stdout.decode().strip().split('\n'):
80+
line = line.strip()
8081
if line.startswith('filename:'):
8182
module_info['filename'] = line.split()[1]
82-
elif line.startswith('depends:'):
83-
module_info['depends'] = line.split(',')[1:]
83+
elif line.startswith('depends:') and line != 'depends:':
84+
if ',' in line:
85+
module_info['depends'] = line.split(',')[1:]
86+
else:
87+
module_info['depends'] = [line.split()[1]]
8488
elif line.startswith('softdep:'):
8589
module_info['softdep'] = line.split()[2::2]
8690
elif line.startswith('firmware:'):

0 commit comments

Comments
 (0)