File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,9 @@ def get_lspci_modules(self):
159159 """
160160 Gets the name of all kernel modules being used by hardware visible in lspci -k
161161 """
162+ if not self .config_dict ['hostonly' ]:
163+ raise RuntimeError ("lscpi module resolution is only available in hostonly mode" )
164+
162165 try :
163166 cmd = self ._run (['lspci' , '-k' ])
164167 except RuntimeError as e :
@@ -187,6 +190,8 @@ def get_lsmod_modules(self):
187190 Gets the name of all currently installed kernel modules
188191 """
189192 from platform import uname
193+ if not self .config_dict ['hostonly' ]:
194+ raise RuntimeError ("lsmod module resolution is only available in hostonly mode" )
190195
191196 if self .config_dict .get ('kernel_version' ) and self .config_dict ['kernel_version' ] != uname ().release :
192197 self .logger .warning ("Kernel version is set to %s, but the current kernel version is %s" % (self .config_dict ['kernel_version' ], uname ().release ))
Original file line number Diff line number Diff line change @@ -57,9 +57,9 @@ def main():
5757 generator .generate_init ()
5858 generator .pack_build ()
5959 except Exception as e :
60- logger .error ("\n \n Error: %s\n \n " % e , exc_info = True )
6160 logger .info ("Dumping config dict:\n " )
62- pretty_print (generator .config_dict )
61+ print (generator .config_dict )
62+ logger .error (e , exc_info = True )
6363
6464
6565if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments