summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2018-12-14 19:43:33 -0800
committerJeff Forcier <jeff@bitprophet.org>2018-12-14 19:43:33 -0800
commit26ae245d95921e5fb660447d80443b00d1816aee (patch)
tree62c25ed9851134222fef3bca22271501613dacf4
parenta376ab00d6ff7cac7498e72671bb4061db65efd6 (diff)
parentea0cd3ec52ce884a46d3eda832990e8a329ea09e (diff)
Merge branch '2.2' into 2.3
-rw-r--r--paramiko/auth_handler.py12
-rw-r--r--paramiko/util.py3
2 files changed, 10 insertions, 5 deletions
diff --git a/paramiko/auth_handler.py b/paramiko/auth_handler.py
index 52154284..bbfa1712 100644
--- a/paramiko/auth_handler.py
+++ b/paramiko/auth_handler.py
@@ -365,10 +365,14 @@ class AuthHandler(object):
err_msg = m.get_string()
m.get_string() # Lang tag - discarded
raise SSHException(
- "GSS-API Error:\nMajor Status: %s\n\
- Minor Status: %s\nError Message:\
- %s\n"
- ) % (str(maj_status), str(min_status), err_msg)
+ """GSS-API Error:
+Major Status: {}
+Minor Status: {}
+Error Message: {}
+""".format(
+ maj_status, min_status, err_msg
+ )
+ )
elif ptype == MSG_USERAUTH_FAILURE:
self._parse_userauth_failure(m)
return
diff --git a/paramiko/util.py b/paramiko/util.py
index 256ac7fb..1fb73da4 100644
--- a/paramiko/util.py
+++ b/paramiko/util.py
@@ -249,7 +249,8 @@ def log_to_file(filename, level=DEBUG):
logger.setLevel(level)
f = open(filename, "a")
handler = logging.StreamHandler(f)
- frm = "%(levelname)-.3s [%(asctime)s.%(msecs)03d] thr=%(_threadid)-3d %(name)s: %(message)s" # noqa
+ frm = "%(levelname)-.3s [%(asctime)s.%(msecs)03d] thr=%(_threadid)-3d"
+ frm += " %(name)s: %(message)s"
handler.setFormatter(logging.Formatter(frm, "%Y%m%d-%H:%M:%S"))
logger.addHandler(handler)