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
8e9f907a
Commit
8e9f907a
authored
Nov 02, 2020
by
Andreas Heine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update uatypes.py
parent
6083efb1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
asyncua/ua/uatypes.py
asyncua/ua/uatypes.py
+4
-1
No files found.
asyncua/ua/uatypes.py
View file @
8e9f907a
...
...
@@ -750,7 +750,10 @@ class Variant(FrozenClass):
if self.VariantType is None:
self.VariantType = self._guess_type(self.Value)
if self.Value is None and not self.is_array and self.VariantType not in (VariantType.Null, VariantType.String, VariantType.DateTime, VariantType.ExtensionObject):
raise UaError(f"
Non
array
Variant
of
type
{
self
.
VariantType
}
cannot
have
value
None
")
if self.Value == None and self.VariantType == VariantType.NodeId:
self.Value = NodeId(0,0)
else:
raise UaError(f"
Non
array
Variant
of
type
{
self
.
VariantType
}
cannot
have
value
None
")
if self.Dimensions is None and isinstance(self.Value, (list, tuple)):
dims = get_shape(self.Value)
if len(dims) > 1:
...
...
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