@@ -31,7 +31,7 @@ def get_findings(self, file, test):
3131 vulnerabilitydata = vulnerabilityfile ["value" ]
3232 findings .extend (self .process_json (vulnerability ) for vulnerability in vulnerabilitydata )
3333 except (json .JSONDecodeError , KeyError ) as e :
34- logger .warning ("Error parsing JSON file %s: %s" , file .name , str ( e ) )
34+ logger .warning ("Error parsing JSON file %s: %s" , file .name , e )
3535 return []
3636 elif str (file .name ).endswith (".zip" ):
3737 if str (file .__class__ ) == "<class '_io.TextIOWrapper'>" :
@@ -71,7 +71,7 @@ def get_findings(self, file, test):
7171 for data in output :
7272 vulnerabilities .append (data )
7373 except (json .JSONDecodeError , KeyError , UnicodeDecodeError ) as e :
74- logger .warning ("Error parsing vulnerability file %s: %s" , vulnerabilityfile , str ( e ) )
74+ logger .warning ("Error parsing vulnerability file %s: %s" , vulnerabilityfile , e )
7575 continue
7676
7777 for machinefile in machinefiles :
@@ -91,7 +91,7 @@ def get_findings(self, file, test):
9191 for data in output :
9292 machines [data .get ("id" )] = data
9393 except (json .JSONDecodeError , KeyError , UnicodeDecodeError ) as e :
94- logger .warning ("Error parsing machine file %s: %s" , machinefile , str ( e ) )
94+ logger .warning ("Error parsing machine file %s: %s" , machinefile , e )
9595 continue
9696 for vulnerability in vulnerabilities :
9797 try :
0 commit comments