fix: Support running git-[im,ex]port-patches with Python3 too (#32303)

* script: Python3 compatibility for utf8 conversion

The unicode() method has been renamed to str() in Python3,
add a wrapper around it to support running against both versions.

* script: don't require python2 for git-[import,export]-patches

The scripts work just fine with python3 too, so use the generic
python executable as the script interpreter.
Most setups don't even require or provide python 2 anymore,
so this saves one from having to install it just for the scripts.
This commit is contained in:
Romain Pokrzywka 2022-01-10 15:47:55 -06:00 committed by GitHub
parent 746927c972
commit 483808a8cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python
import argparse
import sys