summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelie <elie>2015-01-01 15:29:19 +0000
committerelie <elie>2015-01-01 15:29:19 +0000
commitbe461c820684615a8e2422563ba6d932ca0ed3b9 (patch)
tree24094c540a4221ae0de7528edd6b00b0d2cfcc11
parent654b6a5bd3cbd9c02028c1dad4ed57e4e0d09483 (diff)
downloadpyasn1-be461c820684615a8e2422563ba6d932ca0ed3b9.tar.gz
another fix to OctetString.prettyOut()
-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 fa992ff..87a5302 100644
--- a/pyasn1/type/univ.py
+++ b/pyasn1/type/univ.py
@@ -405,7 +405,7 @@ class OctetString(base.AbstractSimpleAsn1Item):
numbers = tuple(( ord(x) for x in value ))
else:
numbers = tuple(value)
- if all(x < 32 or x > 126 for x in numbers):
+ if all(x >= 32 and x <= 126 for x in numbers):
return str(value)
else:
return '0x' + ''.join(( '%.2x' % x for x in numbers ))