]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
Update safe_while's suggested usage pattern
authorZack Cerza <zack@cerza.org>
Sat, 8 Mar 2014 21:19:31 +0000 (15:19 -0600)
committerZack Cerza <zack@cerza.org>
Sat, 8 Mar 2014 21:19:31 +0000 (15:19 -0600)
commit73849c1179c3ed78661f0b1d2c3f9bb40944e4bc
tree42cf5914824bf19d65fdbe853a16f50fc5e4ba8c
parentc98098496eba76a8c21ffb02fcd65c3380f1aff8
Update safe_while's suggested usage pattern

I didn't love the way safe_while was encouraged to be used and it didn't
fit right with the new no-raising behavior. Now it's encouraged to be
used like this:

with safe_while() as proceed:
    while proceed():
        do_things()

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/contextutil.py
teuthology/misc.py
teuthology/test/test_contextutil.py