* [PATCH] backports: specify python2.7 for gentree.py
@ 2013-06-02 23:12 Thomas Pedersen
2013-06-03 0:00 ` Anh K. Huynh
2013-06-03 7:52 ` Johannes Berg
0 siblings, 2 replies; 5+ messages in thread
From: Thomas Pedersen @ 2013-06-02 23:12 UTC (permalink / raw)
To: backports; +Cc: Thomas Pedersen
Apparently gentree.py uses some python2.7 specific syntax. Fixes:
./gentree.py -h
File "./gentree.py", line 72
except OSError, e:
^
SyntaxError: invalid syntax
On distros where /usr/bin/python points to python3.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
---
gentree.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gentree.py b/gentree.py
index fef2faf..e43f508 100755
--- a/gentree.py
+++ b/gentree.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2.7
#
# Generate the output tree into a specified directory.
#
--
1.8.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] backports: specify python2.7 for gentree.py
2013-06-02 23:12 [PATCH] backports: specify python2.7 for gentree.py Thomas Pedersen
@ 2013-06-03 0:00 ` Anh K. Huynh
2013-06-03 3:16 ` Thomas Pedersen
2013-06-03 7:52 ` Johannes Berg
1 sibling, 1 reply; 5+ messages in thread
From: Anh K. Huynh @ 2013-06-03 0:00 UTC (permalink / raw)
To: Thomas Pedersen, backports
Hi,
On Sun, 2 Jun 2013 16:12:13 -0700
Thomas Pedersen <thomas@cozybit.com> wrote:
> Apparently gentree.py uses some python2.7 specific syntax. Fixes:
>
> ./gentree.py -h
> File "./gentree.py", line 72
> except OSError, e:
> ^
> SyntaxError: invalid syntax
>
> On distros where /usr/bin/python points to python3.
FYI, on ArchLinux, `/usr/bin/python` is 3.0, and the old Python
(installed by the package `python2`) uses `/usr/bin/python2`.
--
I am ... 5 dog years old.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] backports: specify python2.7 for gentree.py
2013-06-03 0:00 ` Anh K. Huynh
@ 2013-06-03 3:16 ` Thomas Pedersen
2013-06-03 3:36 ` Anh K. Huynh
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Pedersen @ 2013-06-03 3:16 UTC (permalink / raw)
To: Anh K. Huynh; +Cc: backports
Hello,
On Sun, Jun 2, 2013 at 5:00 PM, Anh K. Huynh <kyanh@viettug.org> wrote:
> On Sun, 2 Jun 2013 16:12:13 -0700
> Thomas Pedersen <thomas@cozybit.com> wrote:
>
>> Apparently gentree.py uses some python2.7 specific syntax. Fixes:
>>
>> ./gentree.py -h
>> File "./gentree.py", line 72
>> except OSError, e:
>> ^
>> SyntaxError: invalid syntax
>>
>> On distros where /usr/bin/python points to python3.
>
> FYI, on ArchLinux, `/usr/bin/python` is 3.0, and the old Python
> (installed by the package `python2`) uses `/usr/bin/python2`.
python2.7 is also provided by the python2 package. Do you think asking
for python2 is a more portable solution?
--
Thomas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] backports: specify python2.7 for gentree.py
2013-06-02 23:12 [PATCH] backports: specify python2.7 for gentree.py Thomas Pedersen
2013-06-03 0:00 ` Anh K. Huynh
@ 2013-06-03 7:52 ` Johannes Berg
1 sibling, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2013-06-03 7:52 UTC (permalink / raw)
To: Thomas Pedersen; +Cc: backports
On Sun, 2013-06-02 at 16:12 -0700, Thomas Pedersen wrote:
> Apparently gentree.py uses some python2.7 specific syntax. Fixes:
>
> ./gentree.py -h
> File "./gentree.py", line 72
> except OSError, e:
This is curious, it already uses
except OSError as e:
in most places, just not this one.
I think we should just make this compatible with both 2.7+ and 3, which
shouldn't be too hard. I tried a bit and the patchlib is the biggest
issue, will try some more after all my meetings.
johannes
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-06-03 7:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-02 23:12 [PATCH] backports: specify python2.7 for gentree.py Thomas Pedersen
2013-06-03 0:00 ` Anh K. Huynh
2013-06-03 3:16 ` Thomas Pedersen
2013-06-03 3:36 ` Anh K. Huynh
2013-06-03 7:52 ` Johannes Berg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.