ubuntu_integration. fix detecting 'python-xdg' module
This commit is contained in:
@@ -31,11 +31,6 @@ try:
|
|||||||
HAS_INDICATE = True
|
HAS_INDICATE = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
HAS_INDICATE = False
|
HAS_INDICATE = False
|
||||||
try:
|
|
||||||
from xdg.BaseDirectory import load_data_paths
|
|
||||||
HAS_PYXDG = True
|
|
||||||
except ImportError:
|
|
||||||
HAS_PYXDG = False
|
|
||||||
|
|
||||||
|
|
||||||
class UbuntuIntegrationPlugin(GajimPlugin):
|
class UbuntuIntegrationPlugin(GajimPlugin):
|
||||||
@@ -64,10 +59,13 @@ class UbuntuIntegrationPlugin(GajimPlugin):
|
|||||||
# {(account, jid): (indicator, [event, ...]), ...}
|
# {(account, jid): (indicator, [event, ...]), ...}
|
||||||
self.events = {}
|
self.events = {}
|
||||||
|
|
||||||
|
try:
|
||||||
|
from xdg.BaseDirectory import load_data_paths
|
||||||
|
except ImportError:
|
||||||
|
raise GajimPluginException("python-xdg is missing!")
|
||||||
|
|
||||||
if not HAS_INDICATE:
|
if not HAS_INDICATE:
|
||||||
raise GajimPluginException("python-indicate is missing!")
|
raise GajimPluginException("python-indicate is missing!")
|
||||||
if not HAS_PYXDG:
|
|
||||||
raise GajimPluginException("python-xdg is missing!")
|
|
||||||
|
|
||||||
self.server = indicate.indicate_server_ref_default()
|
self.server = indicate.indicate_server_ref_default()
|
||||||
self.server.set_type("message.im")
|
self.server.set_type("message.im")
|
||||||
|
|||||||
Reference in New Issue
Block a user