diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-11-14 07:51:03 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-11-14 08:17:11 +0900 |
commit | 8898e2f26d749c8548683e9c4871440a4ccfa87e (patch) | |
tree | aaabab9f4e568f873d3674795944623e464ba451 /main.py | |
parent | 52f1e5d9111c586624de48b5f705e10b67d109b3 (diff) | |
download | git-repo-8898e2f26d749c8548683e9c4871440a4ccfa87e.tar.gz |
Remove magic hack
It should be assumed that on modern development environments, python
is accessible to /usr/bin/env
Change the shebang as necessary and remove the magic hack.
This also means losing the -E option on the call to python, so that
PYTHONPATH and PYTHONHOME will be respected and local configuration
problems in those vars would be noticed
Change-Id: I6f0708ca7693f05a4c3621c338f03619563ba630
Diffstat (limited to 'main.py')
-rwxr-xr-x | main.py | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/sh | 1 | #!/usr/bin/env python |
2 | # | 2 | # |
3 | # Copyright (C) 2008 The Android Open Source Project | 3 | # Copyright (C) 2008 The Android Open Source Project |
4 | # | 4 | # |
@@ -14,14 +14,6 @@ | |||
14 | # See the License for the specific language governing permissions and | 14 | # See the License for the specific language governing permissions and |
15 | # limitations under the License. | 15 | # limitations under the License. |
16 | 16 | ||
17 | magic='--calling-python-from-/bin/sh--' | ||
18 | """exec" python -E "$0" "$@" """#$magic" | ||
19 | if __name__ == '__main__': | ||
20 | import sys | ||
21 | if sys.argv[-1] == '#%s' % magic: | ||
22 | del sys.argv[-1] | ||
23 | del magic | ||
24 | |||
25 | import getpass | 17 | import getpass |
26 | import imp | 18 | import imp |
27 | import netrc | 19 | import netrc |