pylibfdt: Use local pylibfdt module
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@chromium.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>main
parent
50e5cd07f3
commit
155faf6cc2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue