Skip to content

Commit c7f1a48

Browse files
author
Bröcker
committed
hotfix for #381 needs better understanding but works
1 parent 1ccdb5d commit c7f1a48

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/canmatrix/canmatrix.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
import canmatrix.copy
4848
import canmatrix.types
4949
import canmatrix.utils
50+
import copy
5051

5152
if attr.__version__ < '17.4.0': # type: ignore
5253
raise RuntimeError("need attrs >= 17.4.0")
@@ -68,8 +69,8 @@ class J1939needsExtendedIdetifier(ExceptionTemplate): pass
6869

6970
def arbitration_id_converter(source): # type: (typing.Union[int, ArbitrationId]) -> ArbitrationId
7071
"""Converter for attrs which accepts ArbitrationId itself or int."""
71-
return source if isinstance(source, ArbitrationId) else ArbitrationId.from_compound_integer(source)
72-
72+
temp_id = source if isinstance(source, ArbitrationId) else ArbitrationId.from_compound_integer(source)
73+
return copy.deepcopy(temp_id)
7374

7475
@attr.s
7576
class Ecu(object):

0 commit comments

Comments
 (0)