author | David Aguilar <davvid@gmail.com> | |
Sun, 28 Mar 2010 00:45:12 +0000 (17:45 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 29 Mar 2010 04:35:09 +0000 (21:35 -0700) | ||
commit | 0ae08401beb0daef9946b6fe25224a4cf167c655 | |
tree | ed437633ac8ee9edc1a75bc1601b1212f25b1429 | tree | snapshot |
parent | 0476228de500049804ae599f557658c3f9042ad0 | commit | diff |
Makefile: Remove usage of deprecated Python "has_key" method
"has_key" is a deprecated dictionary method in Python 2.6+.
Simplify the sys.path manipulation for installed scripts by
passing a default value to os.getenv() that takes a default
value to be used when the environment variable is missing.
SCRIPT_PYTHON is currently empty but this future-proofs us.
It also fixes things for users who maintain local git forks
with their own SCRIPT_PYTHON additions.
Old code replaced the first element of sys.path[] which is
typically '' (i.e. import library files relative to the script).
It is safer to prepend the extra library path instead.
Signed-off-by: David Aguilar <davvid@gmail.com>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
"has_key" is a deprecated dictionary method in Python 2.6+.
Simplify the sys.path manipulation for installed scripts by
passing a default value to os.getenv() that takes a default
value to be used when the environment variable is missing.
SCRIPT_PYTHON is currently empty but this future-proofs us.
It also fixes things for users who maintain local git forks
with their own SCRIPT_PYTHON additions.
Old code replaced the first element of sys.path[] which is
typically '' (i.e. import library files relative to the script).
It is safer to prepend the extra library path instead.
Signed-off-by: David Aguilar <davvid@gmail.com>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile | diff | blob | history |