summaryrefslogtreecommitdiff
path: root/paramiko/ber.py
diff options
context:
space:
mode:
Diffstat (limited to 'paramiko/ber.py')
-rw-r--r--paramiko/ber.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/paramiko/ber.py b/paramiko/ber.py
index 0991b0dd..92d7121e 100644
--- a/paramiko/ber.py
+++ b/paramiko/ber.py
@@ -89,9 +89,8 @@ class BER(object):
return util.inflate_long(data)
else:
# 1: boolean (00 false, otherwise true)
- raise BERException(
- "Unknown ber encoding type %d (robey is lazy)" % ident
- )
+ msg = "Unknown ber encoding type {:d} (robey is lazy)"
+ raise BERException(msg.format(ident))
@staticmethod
def decode_sequence(data):
@@ -127,7 +126,9 @@ class BER(object):
elif (type(x) is list) or (type(x) is tuple):
self.encode_tlv(0x30, self.encode_sequence(x))
else:
- raise BERException("Unknown type for encoding: %s" % repr(type(x)))
+ raise BERException(
+ "Unknown type for encoding: {!r}".format(type(x))
+ )
@staticmethod
def encode_sequence(data):