From c897263ed0da42bbcd5ffff889eaf73e70af26cd Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Wed, 8 Nov 2006 13:23:38 +0000
Subject: [PATCH] [dkirov] When .so modules are loaded from module path there
 is no need to do extra checks.

---
 src/common/connection_handlers.py                   | 9 +++------
 src/common/sleepy.py                                | 9 +++------
 src/common/zeroconf/connection_handlers_zeroconf.py | 9 +++------
 3 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py
index 516942dde7..ca915da7fa 100644
--- a/src/common/connection_handlers.py
+++ b/src/common/connection_handlers.py
@@ -44,13 +44,10 @@ METACONTACTS_ARRIVED = 'metacontacts_arrived'
 PRIVACY_ARRIVED = 'privacy_arrived'
 HAS_IDLE = True
 try:
-	import common.idle as idle # when we launch gajim from sources
+	import idle
 except:
-	try:
-		import idle # when Gajim is installed
-	except:
-		gajim.log.debug(_('Unable to load idle module'))
-		HAS_IDLE = False
+	gajim.log.debug(_('Unable to load idle module'))
+	HAS_IDLE = False
 
 class ConnectionBytestream:
 	def __init__(self):
diff --git a/src/common/sleepy.py b/src/common/sleepy.py
index 5d31e90b37..a0ce13ae72 100644
--- a/src/common/sleepy.py
+++ b/src/common/sleepy.py
@@ -33,13 +33,10 @@ STATE_AWAKE    = 'awake'
 
 SUPPORTED = True
 try:
-	import common.idle as idle # when we launch gajim from sources
+	import idle
 except:
-	try:
-		import idle # when Gajim is installed
-	except:
-		gajim.log.debug('Unable to load idle module')
-		SUPPORTED = False
+	gajim.log.debug('Unable to load idle module')
+	SUPPORTED = False
 
 class Sleepy:
 
diff --git a/src/common/zeroconf/connection_handlers_zeroconf.py b/src/common/zeroconf/connection_handlers_zeroconf.py
index 2023c7bd09..238de3ee8c 100644
--- a/src/common/zeroconf/connection_handlers_zeroconf.py
+++ b/src/common/zeroconf/connection_handlers_zeroconf.py
@@ -42,13 +42,10 @@ VCARD_ARRIVED = 'vcard_arrived'
 AGENT_REMOVED = 'agent_removed'
 HAS_IDLE = True
 try:
-	import common.idle as idle # when we launch gajim from sources
+	import idle
 except:
-	try:
-		import idle # when Gajim is installed
-	except:
-		gajim.log.debug(_('Unable to load idle module'))
-		HAS_IDLE = False
+	gajim.log.debug(_('Unable to load idle module'))
+	HAS_IDLE = False
 
 
 class ConnectionBytestream:
-- 
GitLab