mirror of
https://github.com/chipsec/chipsec
synced 2026-06-08 13:31:00 +00:00
Win32helper.py error except fix
This commit is contained in:
committed by
Nathaniel Mitchell
parent
749de73d38
commit
2fcdb07f4f
@@ -518,13 +518,13 @@ class Win32Helper(Helper):
|
||||
try:
|
||||
out_buf = win32file.DeviceIoControl( self.driver_handle, ioctl_code, in_buf, out_length, None )
|
||||
except pywintypes.error as _err:
|
||||
err_status = _err[0] + 0x100000000
|
||||
err_status = _err.args[0] + 0x100000000
|
||||
if STATUS_PRIVILEGED_INSTRUCTION == err_status:
|
||||
err_msg = "HW Access Violation: DeviceIoControl returned STATUS_PRIVILEGED_INSTRUCTION (0x{:X})".format(err_status)
|
||||
if logger().DEBUG: logger().error( err_msg )
|
||||
raise HWAccessViolationError( err_msg, err_status )
|
||||
else:
|
||||
_handle_error( "HW Access Error: DeviceIoControl returned status 0x{:X} ({})".format(err_status, _err[2]), err_status )
|
||||
_handle_error( "HW Access Error: DeviceIoControl returned status 0x{:X} ({})".format(err_status, _err.args[2]), err_status )
|
||||
|
||||
return out_buf
|
||||
|
||||
|
||||
Reference in New Issue
Block a user