def require_bond(): try: compat_create_bond('test_req') except IOError: raise SkipTest('can not create <bond>') if not grep('ip link show', 'test_req'): raise SkipTest('can not create <bond>') compat_del_bond('test_req')
def require_bond(): try: compat_create_bond("test_req") except IOError: raise SkipTest("can not create <bond>") if not grep("ip link show", "test_req"): raise SkipTest("can not create <bond>") compat_del_bond("test_req")