mirror of
https://github.com/dgibson/dtc.git
synced 2026-04-11 16:37:42 -04:00
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>
This commit is contained in:
parent
50e5cd07f3
commit
155faf6cc2
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue