Bug 56207 - don't hard-code path to /usr/bin/python
Summary: don't hard-code path to /usr/bin/python
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: medium minor
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-19 21:42 UTC by Peter Simons
Modified: 2013-01-15 01:05 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

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.