[PATCH 1/9] rtemstoolkit/host.py: Change option to search parent directory in Python3.

Cillian O'Donnell cpodonnell8 at gmail.com
Fri Aug 25 21:53:24 UTC 2017


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))
-- 
2.7.4




More information about the devel mailing list