From: Alina Quereilhac Date: Thu, 20 Mar 2014 00:15:11 +0000 (+0100) Subject: Silencing SleekXmpp not installed warning X-Git-Tag: nepi-3.1.0~104 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=2699effff5920f6bfb4028baec0128009ade5b5e;p=nepi.git Silencing SleekXmpp not installed warning --- diff --git a/src/nepi/resources/omf/omf_client.py b/src/nepi/resources/omf/omf_client.py index 396e2d7b..0d4b3ba5 100644 --- a/src/nepi/resources/omf/omf_client.py +++ b/src/nepi/resources/omf/omf_client.py @@ -20,19 +20,22 @@ from nepi.util.logger import Logger - try: import sleekxmpp - from sleekxmpp.exceptions import IqError, IqTimeout + from sleekxmpp.exceptions2 import IqError, IqTimeout class BaseOMFClient(sleekxmpp.ClientXMPP): pass except ImportError: - print "SleekXMPP is not installed. Without this library, \n" + \ - " You will be not able to use OMF Resources \n"+ \ - " If you want to install SleekXmpp : \n"+ \ - " git clone -b develop git://github.com/fritzy/SleekXMPP.git \n"+ \ - " cd SleekXMPP \n"+ \ - "sudo python setup.py install\n" + msg = ("SleekXMPP is not installed. Without this library " + " you will be not able to use OMF Resources " + " if you want to install SleekXmpp : \n" + " git clone -b develop git://github.com/fritzy/SleekXMPP.git \n" + " cd SleekXMPP \n" + " sudo python setup.py install\n") + + logger = Logger("BaseOMFClient") + logger.debug(msg) + class BaseOMFClient(object): pass