Browse Source

Windows Fixed bug with explicit import of input

Aaron Gokaslan 9 years ago
parent
commit
1832dba6a3
1 changed files with 4 additions and 1 deletions
  1. 4 1
      youtube_upload/auth/console.py

+ 4 - 1
youtube_upload/auth/console.py

@@ -6,5 +6,8 @@ def get_code(authorize_url):
     message = "Check this link in your browser: {0}".format(authorize_url)
     sys.stderr.write(message + "\n")
     try: input = raw_input #For Python2 compatability
-    except NameError: pass
+    except NameError: 
+        #For Python3 on Windows compatability
+        try: from builtins import input as input 
+        except ImportError: pass
     return input("Enter verification code: ")