Skip to content

Commit a845b5e

Browse files
committed
Avoid using mutable object as default parameter value
1 parent d846c75 commit a845b5e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

qiling/os/uefi/fncc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/usr/bin/env python3
2-
#
2+
#
33
# Cross Platform and Multi Architecture Advanced Binary Emulation Framework
44
#
55

6-
from typing import Any, Mapping
6+
from typing import Any, Mapping, Optional
77

88
from qiling import Qiling
99
from qiling.const import QL_INTERCEPT
1010

11-
def dxeapi(params: Mapping[str, Any] = {}):
11+
def dxeapi(params: Optional[Mapping[str, Any]] = None):
1212
def decorator(func):
1313
def wrapper(ql: Qiling):
1414
pc = ql.arch.regs.arch_pc
@@ -18,7 +18,7 @@ def wrapper(ql: Qiling):
1818
onenter = ql.os.user_defined_api[QL_INTERCEPT.ENTER].get(fname)
1919
onexit = ql.os.user_defined_api[QL_INTERCEPT.EXIT].get(fname)
2020

21-
return ql.os.call(pc, f, params, onenter, onexit)
21+
return ql.os.call(pc, f, params or {}, onenter, onexit)
2222

2323
return wrapper
2424

0 commit comments

Comments
 (0)