summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2020-03-21 19:05:03 +0100
committerIlya Etingof <etingof@gmail.com>2020-03-21 19:05:03 +0100
commitae1a04874565e7db6c595a99846c2605a271344e (patch)
tree56feb2290f232730b6ad01328df4537f926fac2d
parent470d54db2e5d2056fc291eda92648aad94836e98 (diff)
downloadpyasn1-git-release-0.4.9.tar.gz
Fix `DeprecationWarning: __int__ returned non-int` on Py3release-0.4.9
In `BitString.__int__()`
-rw-r--r--pyasn1/type/univ.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pyasn1/type/univ.py b/pyasn1/type/univ.py
index 10924c3..488241f 100644
--- a/pyasn1/type/univ.py
+++ b/pyasn1/type/univ.py
@@ -551,7 +551,7 @@ class BitString(base.SimpleAsn1Type):
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)