Skip to content

Commit 31926ee

Browse files
committed
[test] functional framework: add CScript hex() for Python 3.4
test/functional/wallet_importmulti.py failed with: AttributeError: 'CScript' object has no attribute 'hex'
1 parent 74ce326 commit 31926ee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/functional/test_framework/script.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,10 @@ def join(self, iterable):
450450
# join makes no sense for a CScript()
451451
raise NotImplementedError
452452

453+
# Python 3.4 compatibility
454+
def hex(self):
455+
return hexlify(self).decode('ascii')
456+
453457
def __new__(cls, value=b''):
454458
if isinstance(value, bytes) or isinstance(value, bytearray):
455459
return super(CScript, cls).__new__(cls, value)

0 commit comments

Comments
 (0)