refs #200 raise ValueError if an object doesn't have a name

This commit is contained in:
Michael Ligh
2020-07-01 20:51:22 +01:00
committed by ikelos
parent 944bf2174f
commit 87ff6dd87c
7 changed files with 14 additions and 6 deletions
@@ -42,7 +42,7 @@ class DriverIrp(interfaces.plugins.PluginInterface):
try:
driver_name = driver.get_driver_name()
except exceptions.InvalidAddressException:
except (ValueError, exceptions.InvalidAddressException):
driver_name = renderers.NotApplicableValue()
for i, address in enumerate(driver.MajorFunction):
@@ -54,7 +54,7 @@ class DriverScan(interfaces.plugins.PluginInterface):
try:
driver_name = driver.get_driver_name()
except exceptions.InvalidAddressException:
except (ValueError, exceptions.InvalidAddressException):
driver_name = renderers.NotApplicableValue()
try:
@@ -319,7 +319,7 @@ class Handles(interfaces.plugins.PluginInterface):
else:
try:
obj_name = entry.NameInfo.Name.String
except exceptions.InvalidAddressException:
except (ValueError, exceptions.InvalidAddressException):
obj_name = ""
except (exceptions.InvalidAddressException):
@@ -52,7 +52,7 @@ class MutantScan(interfaces.plugins.PluginInterface):
try:
name = mutant.get_name()
except exceptions.InvalidAddressException:
except (ValueError, exceptions.InvalidAddressException):
name = renderers.NotApplicableValue()
yield (0, (format_hints.Hex(mutant.vol.offset), name))
@@ -53,7 +53,7 @@ class SymlinkScan(interfaces.plugins.PluginInterface, timeliner.TimeLinerInterfa
try:
from_name = link.get_link_name()
except exceptions.InvalidAddressException:
except (ValueError, exceptions.InvalidAddressException):
continue
try: