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
4bfdefa8
Commit
4bfdefa8
authored
Jul 03, 2024
by
Olivier
Committed by
oroulet
Jul 03, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix typing of new error callback
parent
cf27f8cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
asyncua/client/client.py
asyncua/client/client.py
+3
-3
No files found.
asyncua/client/client.py
View file @
4bfdefa8
...
...
@@ -3,7 +3,7 @@ import logging
import
socket
from
cryptography
import
x509
from
cryptography.hazmat.primitives.asymmetric.types
import
PrivateKeyTypes
from
typing
import
Any
,
Dict
,
Iterable
,
List
,
Optional
,
Sequence
,
Tuple
,
Type
,
Union
,
cast
,
Callable
from
typing
import
Any
,
Dict
,
Iterable
,
List
,
Optional
,
Sequence
,
Tuple
,
Type
,
Union
,
cast
,
Callable
,
Coroutine
from
urllib.parse
import
urlparse
,
unquote
from
pathlib
import
Path
...
...
@@ -72,7 +72,7 @@ class Client:
self
.
secure_channel_id
=
None
self
.
secure_channel_timeout
=
3600000
# 1 hour
self
.
session_timeout
=
3600000
# 1 hour
self
.
connection_lost_callback
:
Optional
[
Callable
[[
Exception
],
None
]]
=
None
self
.
connection_lost_callback
:
Optional
[
Callable
[[
Exception
],
Coroutine
[
Any
,
Any
,
None
]
]]
=
None
self
.
_policy_ids
:
List
[
ua
.
UserTokenPolicy
]
=
[]
self
.
uaclient
:
UaClient
=
UaClient
(
timeout
)
self
.
uaclient
.
pre_request_hook
=
self
.
check_connection
...
...
@@ -561,7 +561,7 @@ class Client:
await
self
.
uaclient
.
inform_subscriptions
(
ua
.
StatusCode
(
ua
.
StatusCodes
.
BadShutdown
))
raise
async
def
_lost_connection
(
self
,
ex
:
Base
Exception
):
async
def
_lost_connection
(
self
,
ex
:
Exception
):
if
not
self
.
connection_lost_callback
:
return
try
:
...
...
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