Exemplo n.º 1
0
def get_err(err_code):
    """Convert an error code into an error message

    Args:
        err_code: Error code value (FDT_ERR_...)

    Returns:
        String error code
    """
    return 'pylibfdt error %d: %s' % (-err_code, libfdt.strerror(-err_code))
Exemplo n.º 2
0
def get_err(err_code):
    """Convert an error code into an error message

    Args:
        err_code: Error code value (FDT_ERR_...)

    Returns:
        String error code
    """
    return 'pylibfdt error %d: %s' % (-err_code, libfdt.strerror(-err_code))
Exemplo n.º 3
0
 def testStrError(self):
     """Check that we can get an error string"""
     self.assertEquals(libfdt.strerror(-libfdt.NOTFOUND),
                       'FDT_ERR_NOTFOUND')
Exemplo n.º 4
0
 def testStrError(self):
     """Check that we can get an error string"""
     self.assertEquals(libfdt.strerror(-libfdt.NOTFOUND),
                       'FDT_ERR_NOTFOUND')