[rtems-tools commit] rtemstoolkit/host.py: Change option to search parent directory in Python3.

Chris Johns chrisj at rtems.org
Tue Aug 29 08:10:13 UTC 2017


Module:    rtems-tools
Branch:    master
Commit:    67d48e2e0712da75c9a0f2213a1f58cf984fa3d1
Changeset: http://git.rtems.org/rtems-tools/commit/?id=67d48e2e0712da75c9a0f2213a1f58cf984fa3d1

Author:    Cillian O'Donnell <cpodonnell8 at gmail.com>
Date:      Sat Aug 26 09:15:50 2017 +0100

rtemstoolkit/host.py: Change option to search parent directory in Python3.

This works in Python2.7 and Python3.5. Python2 __import__ searches relative
and absolute paths by default. Python3 searches only absolute paths as default.
The option change searches 1 parent directory relative to the calling function
and has the same meaning in Python2 and Python3.

---

 rtemstoolkit/host.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rtemstoolkit/host.py b/rtemstoolkit/host.py
index bae56b6..bc75394 100644
--- a/rtemstoolkit/host.py
+++ b/rtemstoolkit/host.py
@@ -84,7 +84,7 @@ def _load():
     #except:
     #    raise error.general('failed to load %s host support' % (name))
 
-    platform = __import__(name, globals(), locals(), ['.', ''])
+    platform = __import__(name, globals(), locals(), ['.', ''], 1)
 
     if platform is None:
         raise error.general('failed to load %s host support' % (name))




More information about the vc mailing list