(family, table, action, *args)
| 41 | |
| 42 | |
| 43 | def nft(family, table, action, *args): |
| 44 | if family in (socket.AF_INET, socket.AF_INET6): |
| 45 | argv = ['nft', action, 'inet', table] + list(args) |
| 46 | else: |
| 47 | raise Exception('Unsupported family "%s"' % family_to_string(family)) |
| 48 | debug1('%s' % ' '.join(argv)) |
| 49 | rv = ssubprocess.call(argv, env=get_env()) |
| 50 | if rv: |
| 51 | raise Fatal('%r returned %d' % (argv, rv)) |
no test coverage detected