Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
python-nbxmpp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gajim
python-nbxmpp
Commits
6e0399b5
Commit
6e0399b5
authored
Oct 26, 2020
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Task: Display timeout error
parent
c2e09adc
Pipeline
#6684
passed with stages
in 33 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
nbxmpp/errors.py
nbxmpp/errors.py
+7
-3
nbxmpp/task.py
nbxmpp/task.py
+1
-1
No files found.
nbxmpp/errors.py
View file @
6e0399b5
...
...
@@ -27,6 +27,10 @@ def is_error(error):
class
BaseError
(
Exception
):
def
__init__
(
self
,
is_fatal
=
False
):
self
.
is_fatal
=
is_fatal
self
.
text
=
''
def
__str__
(
self
):
return
self
.
text
class
StanzaError
(
BaseError
):
...
...
@@ -141,9 +145,9 @@ class TimeoutStanzaError(BaseError):
log_level
=
logging
.
INFO
def
__init__
(
self
,
id_
):
BaseError
.
__init__
(
self
,
is_fatal
=
True
)
self
.
text
=
'
IQ with id %s reached timeout'
%
id_
def
__init__
(
self
):
BaseError
.
__init__
(
self
)
self
.
text
=
'
Timeout reached'
class
RegisterStanzaError
(
StanzaError
):
...
...
nbxmpp/task.py
View file @
6e0399b5
...
...
@@ -309,7 +309,7 @@ class IqRequestTask(Task):
return
if
result
is
None
:
self
.
_error
=
TimeoutStanzaError
(
self
.
_iq_id
)
self
.
_error
=
TimeoutStanzaError
()
self
.
_set_finished
()
return
...
...
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