tags 345614 + patch pending
thanks

* David Whitmarsh <[EMAIL PROTECTED]> [2006-01-02 08:22]:
> Jack dies if you edit the freedb data, choose not to send the updated
> data, and instead of entering a y or an n at the prompt you simply hit
> enter to accept the default from "y/N". 
> 
> From a quick look, it seems your checking the first letter before you
> check if there actually is a first letter.

Your diagnosis is correct, thanks.  A patch is below; I'll upload
fixed packages in about a week since I'm currently waiting for someone
to get back to me before I can make the upload.


diff -urN jack-3.1.1~/jack_prepare.py jack-3.1.1/jack_prepare.py
--- jack-3.1.1~/jack_prepare.py 2006-01-02 10:15:43.000000000 +0100
+++ jack-3.1.1/jack_prepare.py  2006-01-02 10:18:24.000000000 +0100
@@ -487,8 +487,8 @@
     if 
jack_freedb.freedb_query(jack_freedb.freedb_id(jack_ripstuff.all_tracks), 
jack_ripstuff.all_tracks, cf['_freedb_form_file']):
         if cf['_cont_failed_query']:
             
-            x = raw_input("\nfreedb search failed, continue? ") + "x"
-            if string.upper(x[0]) != "Y":
+            x = raw_input("\nfreedb search failed, continue? (y/N) ") + "x"
+            if not x or x[0].upper() != "Y":
                 sys.exit(0)
             cf['_query_on_start'] = 0
         else:
@@ -519,7 +519,7 @@
                     print
                     print pdiff
                     x = raw_input("Would you like to submit these changes to 
the FreeDB server? (y/N) ")
-                    if string.upper(x[0]) == "Y":
+                    if x and x[0].upper() == "Y":
                         jack_freedb.update_revision(file)
                         freedb_submit(jack_progress.status_all['freedb_cat'])
 
@@ -753,11 +753,11 @@
         print "/\\" * 40
         for i in remove_q:
             print i
-        x = raw_input("These files will be deleted, continue? ") + "x"
+        x = raw_input("These files will be deleted, continue? (y/N) ") + "x"
         if cf['_force']:
             info("(forced)")
         else:
-            if string.upper(x[0]) != "Y":
+            if not x or x[0].upper() != "Y":
                 sys.exit(0)
 
         for i in remove_q:

-- 
Martin Michlmayr
http://www.cyrius.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to