Skip to content

Commit

Permalink
Fix DeprecationWarning: __int__ returned non-int on Py3
Browse files Browse the repository at this point in the history
In `BitString.__int__()`
  • Loading branch information
etingof committed Mar 21, 2020
1 parent 9d70fb1 commit db8f1a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyasn1/type/univ.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ def __rshift__(self, count):
return self.clone(SizedInteger(self._value >> count).setBitLength(max(0, len(self._value) - count)))

def __int__(self):
return self._value
return int(self._value)

def __float__(self):
return float(self._value)
Expand Down

0 comments on commit db8f1a7

Please sign in to comment.