We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ccdb5d commit c7f1a48Copy full SHA for c7f1a48
src/canmatrix/canmatrix.py
@@ -47,6 +47,7 @@
47
import canmatrix.copy
48
import canmatrix.types
49
import canmatrix.utils
50
+import copy
51
52
if attr.__version__ < '17.4.0': # type: ignore
53
raise RuntimeError("need attrs >= 17.4.0")
@@ -68,8 +69,8 @@ class J1939needsExtendedIdetifier(ExceptionTemplate): pass
68
69
70
def arbitration_id_converter(source): # type: (typing.Union[int, ArbitrationId]) -> ArbitrationId
71
"""Converter for attrs which accepts ArbitrationId itself or int."""
- return source if isinstance(source, ArbitrationId) else ArbitrationId.from_compound_integer(source)
72
-
+ temp_id = source if isinstance(source, ArbitrationId) else ArbitrationId.from_compound_integer(source)
73
+ return copy.deepcopy(temp_id)
74
75
@attr.s
76
class Ecu(object):
0 commit comments