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
gajim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
194
Issues
194
List
Boards
Labels
Service Desk
Milestones
Merge Requests
20
Merge Requests
20
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
gajim
Commits
2a0bce4e
Commit
2a0bce4e
authored
Sep 29, 2006
by
sb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't attempt to do zeroconf things if avahi is not found,
display notification
parent
d07dc398
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
src/common/zeroconf/connection_zeroconf.py
src/common/zeroconf/connection_zeroconf.py
+20
-3
No files found.
src/common/zeroconf/connection_zeroconf.py
View file @
2a0bce4e
...
...
@@ -86,9 +86,18 @@ def __init__(self, name):
gajim
.
config
.
set
(
'usegpg'
,
False
)
self
.
get_config_values_or_default
()
self
.
zeroconf
=
zeroconf
.
Zeroconf
(
self
.
_on_new_service
,
self
.
_on_remove_service
,
self
.
_on_name_conflictCB
,
self
.
_on_disconnected
,
self
.
username
,
self
.
host
,
self
.
port
)
self
.
avahi_error
=
False
try
:
import
avahi
except
ImportError
:
self
.
avahi_error
=
True
if
not
self
.
avahi_error
:
self
.
zeroconf
=
zeroconf
.
Zeroconf
(
self
.
_on_new_service
,
self
.
_on_remove_service
,
self
.
_on_name_conflictCB
,
self
.
_on_disconnected
,
self
.
username
,
self
.
host
,
self
.
port
)
self
.
muc_jid
=
{}
# jid of muc server for each transport type
self
.
vcard_supported
=
False
...
...
@@ -283,6 +292,14 @@ def change_status(self, show, msg, sync = False, auto = False):
check
=
True
#to check for errors from zeroconf
if
self
.
avahi_error
:
self
.
dispatch
(
'STATUS'
,
'offline'
)
self
.
status
=
'offline'
self
.
dispatch
(
'CONNECTION_LOST'
,
(
_
(
'Could not connect "%s"'
)
%
self
.
name
,
_
(
'Please check if avahi is installed.'
)))
return
# 'connect'
if
show
!=
'offline'
and
not
self
.
connected
:
self
.
connect
(
None
,
show
,
msg
)
...
...
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