[PATCH] docs: add python version in shebang

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux