Red Hat Bugzilla – Bug 445510
Do not rely on env to execute python
Last modified: 2010-10-22 20:47:10 EDT
Description of problem:
Relying on env to execute python can cause unreliable results if the user were
to install python from another source (upstream perhaps).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.install a separate python
[user@host ~]$ sudo sysreport
Traceback (most recent call last):
File "/usr/sbin/sysreport", line 31, in ?
ImportError: No module named sos.policyredhat
[user@host ~]$ which python
no import failure
Created attachment 305001 [details]
Just replace #!/usr/bin/env python with #!/usr/bin/python.
Cloned Bugzilla Bug 446081 for RHEL 4.
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
Customer has verified that packages built with the patch in Comment #2 work on
their system with a second Python interpreter.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.