From a946090127575404760c1f35174770fc88b6da7a Mon Sep 17 00:00:00 2001 From: Alina Quereilhac Date: Thu, 20 Mar 2014 01:50:17 +0100 Subject: [PATCH] Fixing bug in execfuncs when setting the username --- src/nepi/resources/omf/omf_client.py | 6 +++--- src/nepi/util/execfuncs.py | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) 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, -- 2.43.0