def scan_status(scan):
    if (scan.status.complete and not scan.status.error and not scan.status.cancelled):
        return "Done"
    elif(not scan.status.complete and not scan.status.error and not scan.status.cancelled):
        return str(scan.status.percentage)+"%"
    else:
        return "Error"
dataset/ETHPy150Open usharesoft/hammr/src/hammr/utils/scan_utils.py/scan_status/original