Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gajim-plugins
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Evert Mouw
gajim-plugins
Commits
dea1acb8
Commit
dea1acb8
authored
9 years ago
by
Bahtiar Gadimov
Browse files
Options
Downloads
Patches
Plain Diff
Disable OMEMO if dependencies are missing - #9
parent
5e4cf4a6
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
omemo/__init__.py
+12
-1
12 additions, 1 deletion
omemo/__init__.py
with
12 additions
and
1 deletion
omemo/__init__.py
+
12
−
1
View file @
dea1acb8
...
...
@@ -25,7 +25,6 @@ from common.pep import SUPPORTED_PERSONAL_USER_EVENTS
from
plugins
import
GajimPlugin
from
plugins.helpers
import
log_calls
from
.state
import
OmemoState
from
.ui
import
Ui
from
.xmpp
import
(
NS_NOTIFY
,
NS_OMEMO
,
BundleInformationAnnouncement
,
BundleInformationQuery
,
...
...
@@ -34,7 +33,15 @@ from .xmpp import (
iq_ids_to_callbacks
=
{}
AXOLOTL_MISSING
=
'
Please install python-axolotl.
'
log
=
logging
.
getLogger
(
'
gajim.plugin_system.omemo
'
)
try
:
from
.state
import
OmemoState
HAS_AXOLOTL
=
True
except
ImportError
:
log
.
error
(
AXOLOTL_MISSING
)
HAS_AXOLOTL
=
False
class
OmemoPlugin
(
GajimPlugin
):
...
...
@@ -45,6 +52,10 @@ class OmemoPlugin(GajimPlugin):
@log_calls
(
'
OmemoPlugin
'
)
def
init
(
self
):
if
not
HAS_AXOLOTL
:
self
.
activatable
=
False
self
.
available_text
=
_
(
AXOLOTL_MISSING
)
return
self
.
events_handlers
=
{
'
message-received
'
:
(
ged
.
PRECORE
,
self
.
message_received
),
'
pep-received
'
:
(
ged
.
PRECORE
,
self
.
handle_device_list_update
),
...
...
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