Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit a60ae79

Browse files
author
Jay Logue
committed
Fix for bug in Python TLVWriter
-- Fixed a bug in the Python TLVWriter implementation caused all instances of the class to use the same output buffer.
1 parent 71f49e3 commit a60ae79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tools/factory-prov-tool/WeaveTLV.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@
6969

7070
class TLVWriter(object):
7171

72-
def __init__(self, encoding=bytearray(), implicitProfile=None):
73-
self._encoding = encoding
72+
def __init__(self, encoding=None, implicitProfile=None):
73+
self._encoding = encoding if encoding is not None else bytearray()
7474
self._implicitProfile = implicitProfile
7575
self._containerStack = []
7676

0 commit comments

Comments
 (0)