summaryrefslogtreecommitdiff
path: root/pysnmp/proto/rfc1902.py
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2017-08-11 00:45:54 +0200
committerIlya Etingof <etingof@gmail.com>2017-08-11 00:45:54 +0200
commitdc3ff5fe11c2542498892e60b82e938923e62a19 (patch)
treee289f7aeae72cc62581dc8b2b88c2f3d4d5f8ee8 /pysnmp/proto/rfc1902.py
parent9c55a5293c3f19d1c5747c9d0c7be7a7d5bfe7a6 (diff)
downloadpysnmp-git-dc3ff5fe11c2542498892e60b82e938923e62a19.tar.gz
unnecessary OctetString.prettyOut override removed
Diffstat (limited to 'pysnmp/proto/rfc1902.py')
-rw-r--r--pysnmp/proto/rfc1902.py13
1 files changed, 0 insertions, 13 deletions
diff --git a/pysnmp/proto/rfc1902.py b/pysnmp/proto/rfc1902.py
index 6c368e8b..5eb237e0 100644
--- a/pysnmp/proto/rfc1902.py
+++ b/pysnmp/proto/rfc1902.py
@@ -6,7 +6,6 @@
#
from sys import version_info
from pyasn1.type import univ, tag, constraint, namedtype, namedval
-from pyasn1.compat import octets
from pysnmp.proto import rfc1155, error
__all__ = ['Opaque', 'TimeTicks', 'Bits', 'Integer', 'OctetString',
@@ -216,18 +215,6 @@ class OctetString(univ.OctetString):
X.__name__ = cls.__name__
return X
- # modern pyasn1 does this all by itself
- def prettyOut(self, value):
- if version_info[0] <= 2:
- numbers = tuple((ord(x) for x in value))
- else:
- numbers = tuple(value)
- for x in numbers:
- if x < 32 or x > 126:
- return '0x' + ''.join(('%.2x' % x for x in numbers))
- else:
- return octets.octs2str(value)
-
class ObjectIdentifier(univ.ObjectIdentifier):
"""Creates an instance of SNMP OBJECT IDENTIFIER class.