From: Alina Quereilhac Date: Thu, 20 Mar 2014 00:50:17 +0000 (+0100) Subject: Fixing bug in execfuncs when setting the username X-Git-Tag: nepi-3.1.0~102 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=a946090127575404760c1f35174770fc88b6da7a;p=nepi.git Fixing bug in execfuncs when setting the username --- diff --git a/src/nepi/resources/omf/omf_client.py b/src/nepi/resources/omf/omf_client.py index f216fba1..ac76cd30 100644 --- a/src/nepi/resources/omf/omf_client.py +++ b/src/nepi/resources/omf/omf_client.py @@ -27,14 +27,14 @@ try: pass except ImportError: msg = ("SleekXMPP is not installed. Without this library " - " you will be not able to use OMF Resources " - " if you want to install SleekXmpp : \n" + "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) + logger.warning(msg) class BaseOMFClient(object): pass diff --git a/src/nepi/util/execfuncs.py b/src/nepi/util/execfuncs.py index c9980383..6b5f1a5b 100644 --- a/src/nepi/util/execfuncs.py +++ b/src/nepi/util/execfuncs.py @@ -38,8 +38,10 @@ def lexec(command, if sudo: command = "sudo %s" % command - elif user: - command = "su %s ; %s " % (user, command) + + # XXX: Doing 'su user' blocks waiting for a password on stdin + #elif user: + # command = "su %s ; %s " % (user, command) proc = subprocess.Popen(command, shell = True,