예제 #1
0
def status(message):
    print(f"[·] {message}", end="")
    try:
        yield
    except:  # noqa: E722
        print(f"\r[✗] {message}")
        raise
    else:
        print(f"\r[✓] {message}")
    finally:
        models.DBSession().commit()
예제 #2
0
def status(message):
    print(f'[·] {message}', end='')
    try:
        yield
    except:
        print(f'\r[✗] {message}')
        raise
    else:
        print(f'\r[✓] {message}')
    finally:
        models.DBSession().commit()
예제 #3
0
 def teardown():
     models.DBSession().rollback()