I put a print in lsb_release.py to see what the dpkg-query command is
then did
ipython
import lsb_release
lsb_release.check_modules_installed()
the print says:
dpkg-query -f '${Version} ${Provides}
' -W lsb-core lsb-cxx lsb-graphics lsb-desktop lsb-qt4 lsb-languages
lsb-multimedia lsb-printing 2>/dev/null
(yes there's a \n in the string ..see the def check_modules_installed() above)
here's commands.getoutput that's executing the dpkg-query. So somehow
the pipe is closing before it's being told to by pipe.close?
def getoutput(cmd):
"""Return output (stdout or stderr) of executing cmd in a shell."""
return getstatusoutput(cmd)[1]
# Ditto but preserving the exit status.
# Returns a pair (sts, output)
#
def getstatusoutput(cmd):
"""Return (status, output) of executing cmd in a shell."""
import os
pipe = os.popen('{ ' + cmd + '; } 2>&1', 'r')
text = pipe.read()
sts = pipe.close()
if sts is None: sts = 0
if text[-1:] == '\n': text = text[:-1]
return sts, text
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1094218
Title:
lsb_release crashed with IOError in getstatusoutput(): [Errno 10] No
child processes
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lsb/+bug/1094218/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs