mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
use os.path.realpath() instead of os.readlink()
This commit is contained in:
parent
bfa893f3ac
commit
5c83bb0f4a
1 changed files with 1 additions and 3 deletions
|
@ -443,9 +443,7 @@ class AppBuilder(BundleBuilder):
|
||||||
# /usr/bin/python
|
# /usr/bin/python
|
||||||
hashbang = "/usr/bin/python"
|
hashbang = "/usr/bin/python"
|
||||||
else:
|
else:
|
||||||
hashbang = sys.executable
|
hashbang = os.path.realpath(sys.executable)
|
||||||
while os.path.islink(hashbang):
|
|
||||||
hashbang = os.readlink(hashbang)
|
|
||||||
standalone = self.standalone
|
standalone = self.standalone
|
||||||
open(bootstrappath, "w").write(BOOTSTRAP_SCRIPT % locals())
|
open(bootstrappath, "w").write(BOOTSTRAP_SCRIPT % locals())
|
||||||
os.chmod(bootstrappath, 0775)
|
os.chmod(bootstrappath, 0775)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue