Fix getting input in python3

This commit is contained in:
Ritiek
2017-06-22 02:27:18 +05:30
parent 1b1d24c8a2
commit 258b21ff05
2 changed files with 8 additions and 6 deletions

View File

@@ -240,7 +240,7 @@ def check_exists(music_file, raw_song, islist):
return True
# if downloading only single song, prompt to re-download
else:
prompt = raw_input('Song with same name has already been downloaded. Re-download? (y/n): ').lower()
prompt = misc.user_input('Song with same name has already been downloaded. Re-download? (y/n): ').lower()
if prompt == "y":
os.remove("Music/" + file)
return False
@@ -313,10 +313,6 @@ def grab_single(raw_song, number=None):
if __name__ == '__main__':
# python 3 compatibility
if sys.version_info > (3, 0):
raw_input = input
os.chdir(sys.path[0])
if not os.path.exists("Music"):
os.makedirs("Music")