Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mesonium
gajim
Commits
6713333e
Commit
6713333e
authored
5 years ago
by
Philipp Hörist
Browse files
Options
Downloads
Patches
Plain Diff
Zeroconf: Don't use transports constants
The transports module will soon be removed
parent
5e45dc01
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gajim/common/zeroconf/client_zeroconf.py
+3
-6
3 additions, 6 deletions
gajim/common/zeroconf/client_zeroconf.py
with
3 additions
and
6 deletions
gajim/common/zeroconf/client_zeroconf.py
+
3
−
6
View file @
6713333e
...
...
@@ -29,9 +29,6 @@
from
nbxmpp.structs
import
StanzaHandler
from
nbxmpp.plugin
import
PlugIn
from
nbxmpp.idlequeue
import
IdleObject
from
nbxmpp.transports
import
DATA_RECEIVED
from
nbxmpp.transports
import
DATA_SENT
from
nbxmpp.transports
import
DATA_ERROR
from
nbxmpp.util
import
generate_id
from
gajim.common
import
app
...
...
@@ -454,7 +451,7 @@ def read_timeout(self):
if
self
.
fd
in
ids
and
ids
[
self
.
fd
]:
for
(
_id
,
thread_id
)
in
ids
[
self
.
fd
]:
if
hasattr
(
self
.
_owner
,
'
Dispatcher
'
):
self
.
_owner
.
Dispatcher
.
Event
(
''
,
DATA
_
ERROR
,
(
self
.
_owner
.
Dispatcher
.
Event
(
''
,
'
DATA
ERROR
'
,
(
self
.
client
.
to
,
thread_id
))
else
:
self
.
_owner
.
on_not_ok
(
'
connection timeout
'
)
...
...
@@ -541,7 +538,7 @@ def pollin(self):
if
received
.
strip
():
log
.
debug
(
'
received: %s
'
,
received
)
if
hasattr
(
self
.
_owner
,
'
Dispatcher
'
):
self
.
_owner
.
Dispatcher
.
Event
(
''
,
DATA
_
RECEIVED
,
received
)
self
.
_owner
.
Dispatcher
.
Event
(
''
,
'
DATA
RECEIVED
'
,
received
)
self
.
on_receive
(
received
)
else
:
# This should never happed, so we need the debug
...
...
@@ -610,7 +607,7 @@ def _on_send(self):
log
.
debug
(
'
sent: %s
'
,
self
.
sent_data
)
if
hasattr
(
self
.
_owner
,
'
Dispatcher
'
):
self
.
_owner
.
Dispatcher
.
Event
(
''
,
DATA
_
SENT
,
self
.
sent_data
.
decode
(
'
utf-8
'
))
''
,
'
DATA
SENT
'
,
self
.
sent_data
.
decode
(
'
utf-8
'
))
self
.
sent_data
=
None
if
self
.
buff_is_message
:
self
.
_owner
.
on_message_sent
(
self
.
fd
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment