Commit 669aada6 authored by Florent Fourcot's avatar Florent Fourcot

ipset: fix flakes8 (line too long)

Introduced by myself in the previous commits
parent 59b668e4
......@@ -107,8 +107,8 @@ class IPSet(NetlinkSocket):
List installed ipsets. If `name` is provided, list
the named ipset or return an empty list.
Be warned: netlink does not return an error if the ipset does not exist
you will receive an empty list.
Be warned: netlink does not return an error if given name does not
exit, you will receive an empty list.
'''
if len(argv):
kwarg['name'] = argv[0]
......
......@@ -96,14 +96,17 @@ class ipset_msg(nfgen_msg):
(2, 'IPSET_ATTR_IP_TO', 'ipset_ip'),
(3, 'IPSET_ATTR_CIDR', 'be8', NLA_F_NET_BYTEORDER),
(4, 'IPSET_ATTR_PORT', 'be16', NLA_F_NET_BYTEORDER),
(4, 'IPSET_ATTR_PORT_FROM', 'be16', NLA_F_NET_BYTEORDER),
(4, 'IPSET_ATTR_PORT_FROM', 'be16',
NLA_F_NET_BYTEORDER),
(5, 'IPSET_ATTR_PORT_TO', 'be16', NLA_F_NET_BYTEORDER),
(6, 'IPSET_ATTR_TIMEOUT', 'be32', NLA_F_NET_BYTEORDER),
(7, 'IPSET_ATTR_PROTO', 'recursive'),
(8, 'IPSET_ATTR_CADT_FLAGS', 'be32', NLA_F_NET_BYTEORDER),
(8, 'IPSET_ATTR_CADT_FLAGS', 'be32',
NLA_F_NET_BYTEORDER),
(9, 'IPSET_ATTR_CADT_LINENO', 'be32'),
(10, 'IPSET_ATTR_MARK', 'be32', NLA_F_NET_BYTEORDER),
(11, 'IPSET_ATTR_MARKMASK', 'be32', NLA_F_NET_BYTEORDER),
(11, 'IPSET_ATTR_MARKMASK', 'be32',
NLA_F_NET_BYTEORDER),
(17, 'IPSET_ATTR_ETHER', 'l2addr'),
(18, 'IPSET_ATTR_NAME', 'asciiz'),
(19, 'IPSET_ATTR_NAMEREF', 'be32'),
......
......@@ -226,9 +226,9 @@ class TestIPSet(object):
require_user('root')
name = str(uuid4())[:16]
self.ip.create(name, forceadd=True)
res = self.ip.list(name)
res = self.ip.list(name)[0].get_attr("IPSET_ATTR_DATA")
flags = res[0].get_attr("IPSET_ATTR_DATA").get_attr("IPSET_ATTR_CADT_FLAGS")
flags = res.get_attr("IPSET_ATTR_CADT_FLAGS")
assert flags & IPSET_FLAG_WITH_FORCEADD
self.ip.destroy(name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment