Skip to content

Commit

Permalink
use correct superclass call; use dummy instead of _ (underscore)
Browse files Browse the repository at this point in the history
Signed-off-by: Rich Megginson <[email protected]>
  • Loading branch information
richm committed Mar 8, 2021
1 parent b2cec3a commit e70dd1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion module_utils/network_lsr/argument_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def connection_get_non_absent_names(connections):
class ValidationError(MyError):
def __init__(self, name, message):
# pylint: disable=non-parent-init-called
Exception.__init__(self, name + ": " + message)
super(ValidationError, self).__init__(name + ": " + message)
self.error_message = message
self.name = name

Expand Down
4 changes: 1 addition & 3 deletions module_utils/network_lsr/ethtool.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ def get_perm_addr(ifname):
res = ecmd.tobytes()
except AttributeError: # tobytes() is not available in python2
res = ecmd.tostring()
# disable check for bad names:
# pylint: disable=C0102
_, size, perm_addr = struct.unpack("II%is" % MAX_ADDR_LEN, res)
dummy, size, perm_addr = struct.unpack("II%is" % MAX_ADDR_LEN, res)
perm_addr = Util.mac_ntoa(perm_addr[:size])
except IOError:
perm_addr = None
Expand Down

0 comments on commit e70dd1b

Please sign in to comment.