Commit 527a15ac authored by Iustin Pop's avatar Iustin Pop
Browse files

bdev: Add a TODO and a pylint silence

A piece of old code in uses a for loop over a single variable
because we can 'break' out of the loop or exit on the 'else' path. This
is not a nice usage of the for loop, it should be converted to a
standard if...elif...else structure.

In the meantime we silence a warning from pylint (it is actually
invalid, IMHO) and add a TODO.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarOlivier Tharan <>
parent c9ca81c9
......@@ -1573,6 +1573,8 @@ class DRBD8(BaseDRBD):
the attach if can return success.
# TODO: Rewrite to not use a for loop just because there is 'break'
# pylint: disable-msg=W0631
net_data = (self._lhost, self._lport, self._rhost, self._rport)
for minor in (self._aminor,):
info = self._GetDevInfo(self._GetShowData(minor))
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