99 sys .exit ("FATAL: ./lib/ not present in parent diectory.\n " )
1010sys .path .append (os .path .join (sys .path [0 ], "lib" ))
1111try :
12- from common import get_user_response
12+ from common import get_yn_answer
1313except ImportError :
1414 sys .exit ("FATAL: failed to import dependencies from ./lib/\n " )
1515
@@ -18,15 +18,15 @@ def link():
1818 """ Creates symlink to transcode.py in /usr/local/bin or alternate $PATH
1919 """
2020 print ("\n Create symlink for {script_name} on $PATH?" .format (script_name = script_name ))
21- proceed = get_user_response ()
21+ proceed = get_yn_answer ()
2222 if proceed :
2323 if not oct (os .stat (script_realpath ).st_mode )[- 3 :] == 755 :
2424 try :
2525 os .chmod (script_realpath , 0o755 )
2626 except PermissionError :
2727 sys .exit ("\n Error: failed to make {script_name} executable, operation not permitted." .format (script_name = script_name ))
2828 print ("Use default location? /usr/local/bin" )
29- default_location = get_user_response ()
29+ default_location = get_yn_answer ()
3030 if default_location :
3131 try :
3232 os .symlink (script_realpath , os .path .join (os .sep , "usr" , "local" , "bin" , script_name ))
@@ -36,7 +36,7 @@ def link():
3636 sys .exit ("Created symlink to {script_name} in /usr/local/bin\n " )
3737 else :
3838 print ("Use alternate $PATH location?" )
39- alternate_location = get_user_response ()
39+ alternate_location = get_yn_answer ()
4040 if alternate_location :
4141 alternate_path = str (input ("Alternate $PATH location: (case-sensitive) " ))
4242 if alternate_path [0 ] == "~" : alternate_path = os .path .expanduser (alternate_path )
@@ -60,7 +60,7 @@ def unlink():
6060 print ("\n Found {script_name} on $PATH in {path_dir}\n " .format (script_name = script_name , path_dir = path_dir ))
6161 if os .path .islink (script_path_location ):
6262 print ("Remove symlink to {script_name} in {path_dir}?" .format (script_name = script_name , path_dir = path_dir ))
63- proceed = get_user_response ()
63+ proceed = get_yn_answer ()
6464 if proceed :
6565 try :
6666 os .unlink (script_path_location )
0 commit comments