Skip to content

Commit

Permalink
Rename Deprecated Fixed Length Function Names
Browse files Browse the repository at this point in the history
After the following commit, 4c71d45, the fixed length accessor functions for the Octet String class were changed to be PEP 8 compliant.

This commit updates SNMPv2-SMI to use the PEP 8 compliant function calls.
  • Loading branch information
WakkaTrout authored Jan 22, 2025
1 parent f360acc commit 5255a12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pysnmp/smi/mibs/SNMPv2-SMI.py
Original file line number Diff line number Diff line change
Expand Up @@ -1228,8 +1228,8 @@ def setFromName(self, obj, value, impliedFlag=None, parentIndices=None):
# rfc1902, 7.7
if impliedFlag:
return obj.clone(tuple(value)), ()
elif obj.isFixedLength():
fixed_length = obj.getFixedLength()
elif obj.is_fixed_length():
fixed_length = obj.get_fixed_length()
return obj.clone(tuple(value[:fixed_length])), value[fixed_length:]
else:
return obj.clone(tuple(value[1 : value[0] + 1])), value[value[0] + 1 :]
Expand All @@ -1256,7 +1256,7 @@ def getAsName(self, obj, impliedFlag=None, parentIndices=None):
elif self.__ipaddrTagSet.isSuperTagSetOf(obj.getTagSet()):
return obj.asNumbers()
elif baseTag == self.__strBaseTag:
if impliedFlag or obj.isFixedLength():
if impliedFlag or obj.is_fixed_length():
initial = ()
else:
initial = (len(obj),)
Expand Down

0 comments on commit 5255a12

Please sign in to comment.