aboutsummaryrefslogtreecommitdiff
path: root/pyasn1/type/univ.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyasn1/type/univ.py')
-rw-r--r--pyasn1/type/univ.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pyasn1/type/univ.py b/pyasn1/type/univ.py
index 63c21eb..1e7c8ce 100644
--- a/pyasn1/type/univ.py
+++ b/pyasn1/type/univ.py
@@ -1498,7 +1498,11 @@ class Real(base.AbstractSimpleAsn1Item):
if self.isInf:
return self.prettyOut(self._value)
else:
- return str(float(self))
+ try:
+ return str(float(self))
+
+ except OverflowError:
+ return '<overflow>'
@property
def isPlusInf(self):