MCPcopy Index your code
hub / github.com/sshuttle/sshuttle / nft

Function nft

sshuttle/linux.py:43–51  ·  view source on GitHub ↗
(family, table, action, *args)

Source from the content-addressed store, hash-verified

41
42
43def 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))

Callers 1

_nftMethod · 0.90

Calls 4

family_to_stringFunction · 0.90
debug1Function · 0.90
get_envFunction · 0.90
FatalClass · 0.90

Tested by

no test coverage detected