diff options
author | elie <elie> | 2015-01-01 15:29:19 +0000 |
---|---|---|
committer | elie <elie> | 2015-01-01 15:29:19 +0000 |
commit | be461c820684615a8e2422563ba6d932ca0ed3b9 (patch) | |
tree | 24094c540a4221ae0de7528edd6b00b0d2cfcc11 | |
parent | 654b6a5bd3cbd9c02028c1dad4ed57e4e0d09483 (diff) | |
download | pyasn1-be461c820684615a8e2422563ba6d932ca0ed3b9.tar.gz |
another fix to OctetString.prettyOut()
-rw-r--r-- | pyasn1/type/univ.py | 2 |
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 )) |