Bug 56207

Summary: don't hard-code path to /usr/bin/python
Product: systemd Reporter: Peter Simons <simons>
Component: generalAssignee: systemd-bugs
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: minor    
Priority: medium CC: maxposedon, simons
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Peter Simons 2012-10-19 21:42:24 UTC
The python interpreter on my system isn't located in /usr/bin, hence the following scripts won't work by default:

  # grep -R /usr/bin/python .
  ./test/rule-syntax-check.py:#!/usr/bin/python
  ./src/analyze/systemd-analyze:#!/usr/bin/python

Please use "/usr/bin/env python" instead. Thank you!
Comment 1 Maksim Melnikau 2012-11-19 07:23:16 UTC
Keep in mind that systemd-analyze is python2.7 only nowadays.

% python3.2 /usr/bin/systemd-analyze plot
Traceback (most recent call last):
  File "/usr/bin/systemd-analyze", line 309, in <module>
    verb.get(args[0], unknown_verb)()
  File "/usr/bin/systemd-analyze", line 277, in plot
    surface.finish()
TypeError: must be str, not bytes
Comment 2 Lennart Poettering 2013-01-15 01:05:53 UTC
Fixed in 197.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.