[PATCH 02/10] pylibfdt: Use local pylibfdt module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Some systems may have the Python libfdt.py library installed. Adjust the
tests to prepend the local libfdt path so that we test the local version
instead of the system version.

Signed-off-by: Simon Glass <sjg@xxxxxxxxxxxx>
---

 tests/pylibfdt_tests.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/pylibfdt_tests.py b/tests/pylibfdt_tests.py
index e8a4582..32a1daa 100644
--- a/tests/pylibfdt_tests.py
+++ b/tests/pylibfdt_tests.py
@@ -53,7 +53,7 @@ import sys
 import types
 import unittest
 
-sys.path.append('../pylibfdt')
+sys.path.insert(0, '../pylibfdt')
 import libfdt
 from libfdt import FdtException, QUIET_NOTFOUND, QUIET_ALL
 
@@ -66,7 +66,7 @@ def get_err(err_code):
     Returns:
         String error code
     """
-    return 'pylibfdt error %d: %s' % (-err_code, libfdt.fdt_strerror(-err_code))
+    return 'pylibfdt error %d: %s' % (-err_code, libfdt.strerror(-err_code))
 
 def _ReadFdt(fname):
     """Read a device tree file into an Fdt object, ready for use
-- 
2.14.1.480.gb18f417b89-goog

--
To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux