Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cpuinfo/cpuinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ def _filter_dict_keys_with_empty_values(info, acceptable_values = {}):
return filtered_info

class ASM:
def __init__(self, restype=None, argtypes=(), machine_code=[]):
def __init__(self, restype=None, argtypes=(), machine_code=None):
self.restype = restype
self.argtypes = argtypes
self.machine_code = machine_code
Expand Down Expand Up @@ -1000,7 +1000,7 @@ def __init__(self, trace=None):
# Figure out if SE Linux is on and in enforcing mode
self.is_selinux_enforcing = _is_selinux_enforcing(trace)

def _asm_func(self, restype=None, argtypes=(), machine_code=[]):
def _asm_func(self, restype=None, argtypes=(), machine_code=None):
asm = ASM(restype, argtypes, machine_code)
asm.compile()
return asm
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class MockCPUID:
_counter = 0
_is_first = False

def _asm_func(self, restype=None, argtypes=(), machine_code=[]):
def _asm_func(self, restype=None, argtypes=(), machine_code=None):
class CPUIDGetTicks:
# NOTE: This assumes that the function returned is a get_ticks function
def func(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cpuid.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class MockASM(ASM):
is_first = False

def __init__(self, restype=None, argtypes=(), machine_code=[]):
def __init__(self, restype=None, argtypes=(), machine_code=None):
super(MockASM, self).__init__(restype, argtypes, machine_code)

def compile(self):
Expand Down
4 changes: 2 additions & 2 deletions tools/get_system_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def print_output(name, output):


class ASM:
def __init__(self, restype=None, argtypes=(), machine_code=[]):
def __init__(self, restype=None, argtypes=(), machine_code=None):
self.restype = restype
self.argtypes = argtypes
self.machine_code = machine_code
Expand Down Expand Up @@ -392,7 +392,7 @@ def __init__(self):
# Figure out if SE Linux is on and in enforcing mode
self.is_selinux_enforcing = _is_selinux_enforcing()

def _asm_func(self, restype=None, argtypes=(), machine_code=[]):
def _asm_func(self, restype=None, argtypes=(), machine_code=None):
asm = ASM(restype, argtypes, machine_code)
asm.compile()
return asm
Expand Down