def timedelta_total_seconds(delta):
    try:
        delta.total_seconds
    except __HOLE__:
        # On Python 2.6, timedelta instances do not have
        # a .total_seconds() method.
        total_seconds = delta.days * 24 * 60 * 60 + delta.seconds
    else:
        total_seconds = delta.total_seconds()

    return total_seconds
dataset/ETHPy150Open jpadilla/pyjwt/jwt/compat.py/timedelta_total_seconds