Bug#345614: jack: fails when trying to not submit updated freedb data by hitting enter to accept the default (y/N)

2006-01-02 Thread David Whitmarsh
Package: jack
Version: 3.1.1-13
Severity: normal

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.

Thanks

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.4.29
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages jack depends on:
ii  cdparanoia3a9.8-11   An audio extraction tool for sampl
ii  flac  1.1.2-3+b1 Free Lossless Audio Codec - comman
ii  python2.3.5-3An interactive high-level object-o
ii  python-cddb   1.4-4  Python interface to CD-IDs and Fre
ii  python-eyed3  0.6.8-1Python module for id3-tags manipul
ii  python-flac   0.0.4-1Free Lossless Audio Codec [Python 
ii  python-pyvorbis   1.3-1  A Python interface to the Ogg Vorb
ii  vorbis-tools  1.1.1-1several Ogg Vorbis tools

jack recommends no packages.

-- no debconf information


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



Bug#345614: jack: fails when trying to not submit updated freedb data by hitting enter to accept the default (y/N)

2006-01-02 Thread Martin Michlmayr
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.0 +0100
+++ jack-3.1.1/jack_prepare.py  2006-01-02 10:18:24.0 +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]