From 7a442484a73314d445a29d4ed12a3d90208c702d Mon Sep 17 00:00:00 2001 From: Craig Hickman Date: Tue, 18 Feb 2020 10:14:28 +0000 Subject: [PATCH 1/2] BugFix - TypeError when method is called with no inputArguments. Added case to handle this. --- opcua/server/address_space.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opcua/server/address_space.py b/opcua/server/address_space.py index a0901e70d..517d6a61a 100644 --- a/opcua/server/address_space.py +++ b/opcua/server/address_space.py @@ -463,6 +463,8 @@ def _call(self, method): res.StatusCode = ua.StatusCode(ua.StatusCodes.BadNothingToDo) else: try: + if method.InputArguments is None: + method.InputArguments = [] result = node.call(method.ObjectId, *method.InputArguments) if isinstance(result, ua.CallMethodResult): res = result From 308ad8c5c6d3b227a65c11c9c09bd1cdaa7b6ae0 Mon Sep 17 00:00:00 2001 From: Craig Hickman Date: Tue, 18 Feb 2020 10:30:19 +0000 Subject: [PATCH 2/2] Increase sleep time while waiting for event --- tests/tests_subscriptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests_subscriptions.py b/tests/tests_subscriptions.py index 9943eb8eb..be6c916cc 100644 --- a/tests/tests_subscriptions.py +++ b/tests/tests_subscriptions.py @@ -128,7 +128,7 @@ def test_subscription_count_list(self): val = copy(val) # we do not want to modify object in our db, we need a copy in order to generate event val.append(i) var.set_value(copy(val)) - time.sleep(0.2) # let last event arrive + time.sleep(0.3) # let last event arrive self.assertEqual(myhandler.datachange_count, nb + 1) sub.delete()