From 0551538c40f02c6cd87f152b227f9dc3d6564c51 Mon Sep 17 00:00:00 2001 From: Gui Chen Date: Wed, 15 Aug 2012 23:28:40 +0800 Subject: [PATCH] make proper for python interpreter in bootstrap mic Signed-off-by: Gui Chen --- mic/rt_util.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mic/rt_util.py b/mic/rt_util.py index bb27bfe..f7264da 100644 --- a/mic/rt_util.py +++ b/mic/rt_util.py @@ -155,6 +155,12 @@ def sync_mic(bootstrap, binpth = '/usr/bin/mic', libpth='/usr/lib/mic', \ with open(_path(conf), 'w') as wf: wf.write(conf_str) + # correct python interpreter + mic_cont = file(_path(binpth)).read() + mic_cont = "#!/usr/bin/python\n" + mic_cont + with open(_path(binpth), 'w') as wf: + wf.write(mic_cont) + def safecopy(src, dst, override=True): if os.path.exists(dst): os.system('rm -rf %s' % dst) -- 2.7.4