def str_from_signal(code):
    """ Return a description about what happened when the
    retcode of a program is less than zero

    """
    if os.name == "nt":
        # windows ret code are usually displayed
        # in hexa:
        value = 2 ** 32 - code
        as_str = "0x%X" % (value)
        if value == 0xC0000135:
            return as_str % "%s : Failed to find required DLL"
        else:
            return as_str
    if code == signal.SIGSEGV:
        return "Segmentation fault"
    if code == signal.SIGABRT:
        return "Aborted"
    if code == signal.SIGTRAP and sys.platform == "darwin":
        return "Trace trap (could not find .dylib)"
    return "%i" % code
dataset/ETHPy150Open aldebaran/qibuild/python/qisys/command.py/str_from_signal/swapped operands of `%`