def require_bridge(): try: compat_create_bridge('test_req') except OSError: raise SkipTest('can not create <bridge>') if not grep('ip link show', 'test_req'): raise SkipTest('can not create <bridge>') compat_del_bridge('test_req')
def require_bridge(): try: compat_create_bridge("test_req") except OSError: raise SkipTest("can not create <bridge>") if not grep("ip link show", "test_req"): raise SkipTest("can not create <bridge>") compat_del_bridge("test_req")