summaryrefslogtreecommitdiff
path: root/paramiko
diff options
context:
space:
mode:
Diffstat (limited to 'paramiko')
-rw-r--r--paramiko/util.py6
-rw-r--r--paramiko/win_pageant.py5
2 files changed, 4 insertions, 7 deletions
diff --git a/paramiko/util.py b/paramiko/util.py
index 5a21977e..2c6287b6 100644
--- a/paramiko/util.py
+++ b/paramiko/util.py
@@ -312,12 +312,12 @@ def asbytes(s):
"""
try:
# Attempt to run through our version of b(), which does the Right Thing
- # for string/unicode/buffer (Py2) or bytes/str (Py3), and raises
- # TypeError if it's not one of those types.
+ # for unicode strings vs bytestrings, and raises TypeError if it's not
+ # one of those types.
return b(s)
except TypeError:
try:
- # If it wasn't a string/byte/buffer type object, try calling an
+ # If it wasn't a string/byte/buffer-ish object, try calling an
# asbytes() method, which many of our internal classes implement.
return s.asbytes()
except AttributeError:
diff --git a/paramiko/win_pageant.py b/paramiko/win_pageant.py
index a1096ee8..780824c1 100644
--- a/paramiko/win_pageant.py
+++ b/paramiko/win_pageant.py
@@ -28,10 +28,7 @@ import struct
from paramiko.common import zero_byte
from paramiko.util import b
-try:
- import _thread as thread # Python 3.x
-except ImportError:
- import thread # Python 2.5-2.7
+import _thread as thread
from . import _winapi