Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
opcua-asyncio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nikola Balog
opcua-asyncio
Commits
1e06fcef
Commit
1e06fcef
authored
Nov 24, 2017
by
Mathias Lüdtke
Committed by
oroulet
Nov 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle tuple and None in uamethod decorator
parent
abcd84b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
opcua/common/methods.py
opcua/common/methods.py
+7
-2
No files found.
opcua/common/methods.py
View file @
1e06fcef
...
@@ -60,12 +60,17 @@ def uamethod(func):
...
@@ -60,12 +60,17 @@ def uamethod(func):
parent
=
args
[
0
]
parent
=
args
[
0
]
args
=
args
[
1
:]
args
=
args
[
1
:]
result
=
func
(
self
,
parent
,
*
[
arg
.
Value
for
arg
in
args
])
result
=
func
(
self
,
parent
,
*
[
arg
.
Value
for
arg
in
args
])
if
isinstance
(
result
,
ua
.
CallMethodResult
):
if
result
is
None
:
return
[]
elif
isinstance
(
result
,
ua
.
CallMethodResult
):
result
.
OutputArguments
=
to_variant
(
*
result
.
OutputArguments
)
result
.
OutputArguments
=
to_variant
(
*
result
.
OutputArguments
)
return
result
return
result
elif
isinstance
(
result
,
ua
.
StatusCode
):
elif
isinstance
(
result
,
ua
.
StatusCode
):
return
result
return
result
return
to_variant
(
result
)
elif
isinstance
(
result
,
tuple
):
return
to_variant
(
*
result
)
else
:
return
to_variant
(
result
)
return
wrapper
return
wrapper
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment