[compat] Fix imports
authorPhilipp Hagemeister <phihag@phihag.de>
Sun, 2 Nov 2014 10:26:40 +0000 (11:26 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Sun, 2 Nov 2014 10:26:40 +0000 (11:26 +0100)
youtube_dl/compat.py
youtube_dl/utils.py

index 08e8d64d7c49f992a10e33de324193e313473eba..3e35e2b84625cf55f41ee7a572417b54bca14478 100644 (file)
@@ -280,6 +280,7 @@ except AttributeError:
 if sys.version_info < (3, 0) and sys.platform == 'win32':
     def compat_getpass(prompt, *args, **kwargs):
         if isinstance(prompt, compat_str):
+            from .utils import preferredencoding
             prompt = prompt.encode(preferredencoding())
         return getpass.getpass(prompt, *args, **kwargs)
 else:
index b0255c943008b50b4af428d218be322b5aa68248..620c4fe8a154cf209d3aada650fd7f8db70e7a59 100644 (file)
@@ -8,7 +8,6 @@ import ctypes
 import datetime
 import email.utils
 import errno
-import getpass
 import gzip
 import itertools
 import io