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
0811f733
Commit
0811f733
authored
Apr 30, 2022
by
Alexander Schrode
Committed by
oroulet
May 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix model comparison
Comparing 1.04.7 and 1.04.11 failed, use compare list instead of str compare.
parent
1f1fab5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
asyncua/common/xmlimporter.py
asyncua/common/xmlimporter.py
+4
-2
No files found.
asyncua/common/xmlimporter.py
View file @
0811f733
...
...
@@ -4,7 +4,7 @@ format is the one from opc-ua specification
"""
import
logging
import
uuid
from
typing
import
Union
,
Dict
from
typing
import
Union
,
Dict
,
List
from
dataclasses
import
fields
,
is_dataclass
from
asyncua
import
ua
...
...
@@ -14,6 +14,8 @@ from ..ua.uaerrors import UaError
_logger
=
logging
.
getLogger
(
__name__
)
def
_parse_version
(
version_string
:
str
)
->
List
[
int
]:
return
[
int
(
v
)
for
v
in
version_string
.
split
(
'.'
)]
class
XmlImporter
:
def
__init__
(
self
,
server
):
...
...
@@ -70,7 +72,7 @@ class XmlImporter:
for
req_model
in
req_models
:
if
(
model
[
"ModelUri"
]
==
req_model
[
"ModelUri"
]
and
model
[
"PublicationDate"
]
>=
req_model
[
"PublicationDate"
]):
if
"Version"
in
model
and
"Version"
in
req_model
:
if
model
[
"Version"
]
>=
req_model
[
"Version"
]
:
if
_parse_version
(
model
[
"Version"
])
>=
_parse_version
(
req_model
[
"Version"
])
:
req_models
.
remove
(
req_model
)
else
:
req_models
.
remove
(
req_model
)
...
...
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