refs #1164 ogRaiseError function call correction
parent
d061c6116a
commit
6bc47bb157
|
@ -38,7 +38,11 @@ def ogAddRegistryValue(path_mountpoint, str_hive, str_key, str_valuename, str_va
|
||||||
elif str_valuetype.upper() == 'DWORD':
|
elif str_valuetype.upper() == 'DWORD':
|
||||||
TYPE = 4
|
TYPE = 4
|
||||||
else:
|
else:
|
||||||
SystemLib.ogRaiseError(OG_ERR_OUTOFLIMIT, str_valuetype)
|
SystemLib.ogRaiseError(
|
||||||
|
"session",
|
||||||
|
ogGlobals.OG_ERR_OUTOFLIMIT,
|
||||||
|
f"Error: {str_valuetype}",
|
||||||
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
# Add the registry value.
|
# Add the registry value.
|
||||||
|
@ -83,7 +87,11 @@ def ogGetHivePath(path_mountpoint, str_hive):
|
||||||
if FILE and os.path.isfile(FILE):
|
if FILE and os.path.isfile(FILE):
|
||||||
return FILE
|
return FILE
|
||||||
else:
|
else:
|
||||||
SystemLib.ogRaiseError(OG_ERR_NOTFOUND, f"{path_mountpoint} {str_hive}")
|
SystemLib.ogRaiseError(
|
||||||
|
"session",
|
||||||
|
ogGlobals.OG_ERR_NOTFOUND,
|
||||||
|
f"{path_mountpoint} {str_hive}"
|
||||||
|
)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def ogGetRegistryValue(path_mountpoint, str_hive, str_valuename):
|
def ogGetRegistryValue(path_mountpoint, str_hive, str_valuename):
|
||||||
|
@ -161,7 +169,11 @@ def ogSetRegistryValue(path_mountpoint, str_hive, str_valuename, str_data):
|
||||||
if f"BINARY.*<{str_valuename.rsplit('\\', 1)[-1]}>" in output:
|
if f"BINARY.*<{str_valuename.rsplit('\\', 1)[-1]}>" in output:
|
||||||
# Procesar tipo binario (incluir nº de bytes y líneas de 16 parejas hexadecimales).
|
# Procesar tipo binario (incluir nº de bytes y líneas de 16 parejas hexadecimales).
|
||||||
if not re.match(r'^([0-9A-F]{2} )*$', str_data):
|
if not re.match(r'^([0-9A-F]{2} )*$', str_data):
|
||||||
SystemLib.ogRaiseError(OG_ERR_FORMAT, f'"{str_data}"')
|
SystemLib.ogRaiseError(
|
||||||
|
"session",
|
||||||
|
ogGlobals.OG_ERR_FORMAT,
|
||||||
|
f'"{str_data}"'
|
||||||
|
)
|
||||||
return
|
return
|
||||||
n = len(str_data) + 1
|
n = len(str_data) + 1
|
||||||
with open(tmpfile, 'w') as f:
|
with open(tmpfile, 'w') as f:
|
||||||
|
|
Loading…
Reference in New Issue