mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] docs: add python version in shebang
@ 2019-09-15 19:31 Stefan Lengfeld
  2019-09-17  8:01 ` Uwe Kleine-König
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Lengfeld @ 2019-09-15 19:31 UTC (permalink / raw)
  To: barebox

On my machine 'make docs' fails with

    Traceback (most recent call last):
      File "/home/stc/git/barebox/Documentation/gen_commands.py", line 156, in <module>
        parse_c(source)
      File "/home/stc/git/barebox/Documentation/gen_commands.py", line 34, in parse_c
        for line in file(name, 'r'):
    NameError: name 'file' is not defined

because /usr/bin/python points to python3 instead of python2. Fix this
by including the language version in the shebang of the script.

Signed-off-by: Stefan Lengfeld <contact@stefanchrist.eu>
---
 Documentation/gen_commands.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/gen_commands.py b/Documentation/gen_commands.py
index 6251b4f22..b46165882 100755
--- a/Documentation/gen_commands.py
+++ b/Documentation/gen_commands.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 
 import errno
 import os
-- 
2.21.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-09-18 19:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-15 19:31 [PATCH] docs: add python version in shebang Stefan Lengfeld
2019-09-17  8:01 ` Uwe Kleine-König
2019-09-17  8:02   ` [PATCH 1/2] Convert latin1 files to utf-8 Uwe Kleine-König
2019-09-17 10:47     ` Sascha Hauer
2019-09-17  8:09   ` [PATCH 2/2] Documentation: make gen_commands helper python3 compatible Uwe Kleine-König
2019-09-17  8:33     ` Uwe Kleine-König
2019-09-18 19:25   ` [PATCH] docs: add python version in shebang Stefan Lengfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox