From faff9e4bb431919a4bc7e4dc4a9ca188e2d18113 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 22 Apr 2020 09:06:28 -0400 Subject: test: Remove unused, undocumented and misleading CScript.__add__ --- test/functional/test_framework/script.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'test/functional/test_framework/script.py') diff --git a/test/functional/test_framework/script.py b/test/functional/test_framework/script.py index e587a77f64..016a2b4f0f 100644 --- a/test/functional/test_framework/script.py +++ b/test/functional/test_framework/script.py @@ -449,15 +449,8 @@ class CScript(bytes): return other def __add__(self, other): - # Do the coercion outside of the try block so that errors in it are - # noticed. - other = self.__coerce_instance(other) - - try: - # bytes.__add__ always returns bytes instances unfortunately - return CScript(super(CScript, self).__add__(other)) - except TypeError: - raise TypeError('Can not add a %r instance to a CScript' % other.__class__) + # add makes no sense for a CScript() + raise NotImplementedError def join(self, iterable): # join makes no sense for a CScript() -- cgit v1.2.3