Your message dated Mon, 29 Jun 2009 21:05:12 +0200
with message-id <[email protected]>
and subject line fixed in 0.15
has caused the Debian Bug report #523892,
regarding gaupol: [PATCH] encodings.py has uninformative error messages
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
523892: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523892
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: gaupol
Version: 0.13.1-1
Severity: minor

When a user specifies invalid encoding[*] and moves his mouse above
tab label, he gets a bunch of void ValueError's.

  [*] Which is invalid from gaupol's point of view but may be
      perfectly fine from user's.

Without error messages, the only thing user can do to find out what's
wrong is consulting sources.

-----BEGIN EXAMPLE-----
$ gaupol -e utf-8 -v example.avi example.srt
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/gaupol/gtk/page.py", line 280, in 
_on_tab_label_query_tooltip
    encoding = gaupol.encodings.code_to_long_name(main_file.encoding)
  File "/usr/lib/python2.5/site-packages/gaupol/encodings.py", line 164, in 
code_to_long_name
    raise ValueError
ValueError
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/gaupol/gtk/page.py", line 280, in 
_on_tab_label_query_tooltip
    encoding = gaupol.encodings.code_to_long_name(main_file.encoding)
  File "/usr/lib/python2.5/site-packages/gaupol/encodings.py", line 164, in 
code_to_long_name
    raise ValueError
ValueError
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/gaupol/gtk/page.py", line 280, in 
_on_tab_label_query_tooltip
    encoding = gaupol.encodings.code_to_long_name(main_file.encoding)
  File "/usr/lib/python2.5/site-packages/gaupol/encodings.py", line 164, in 
code_to_long_name
    raise ValueError
ValueError
-----END EXAMPLE-----

See the patch below.

--- gaupol/encodings.py.orig	2008-08-10 14:33:51.000000000 +0300
+++ gaupol/encodings.py	2009-04-13 13:25:24.532236010 +0300
@@ -139,7 +139,7 @@
     for item in _encodings:
         if item[CODE] == code:
             return item[CODE]
-    raise ValueError
+    raise ValueError(code)
 
 def code_to_description(code):
     """Convert encoding code to localized description.
@@ -149,7 +149,7 @@
     for item in _encodings:
         if item[CODE] == code:
             return item[DESC]
-    raise ValueError
+    raise ValueError(code)
 
 def code_to_long_name(code):
     """Convert encoding code to localized long name.
@@ -161,7 +161,7 @@
         if item[CODE] == code:
             name, description = item[NAME], item[DESC]
             return _("%(description)s (%(name)s)") % locals()
-    raise ValueError
+    raise ValueError(code)
 
 def code_to_name(code):
     """Convert encoding code to name.
@@ -171,7 +171,7 @@
     for item in _encodings:
         if item[CODE] == code:
             return item[NAME]
-    raise ValueError
+    raise ValueError(code)
 
 def detect_ensure(value, path):
     if value is not None:
@@ -257,4 +257,4 @@
     for item in _encodings:
         if item[NAME] == name:
             return item[CODE]
-    raise ValueError
+    raise ValueError(name)
BTW, `utf-8' is more natural (to me at least) than `utf_8':

  $ iconv -l | grep -iE 'utf.?8'
  ISO-10646/UTF-8/
  ISO-10646/UTF8/
  UTF-8//
  UTF8//

  $ locale | grep LANG
  LANG=en_US.UTF-8

Have fun.

-- 
vvv

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gaupol depends on:
ii  python                        2.5.4-2    An interactive high-level object-o
ii  python-central                0.6.11     register and build utility for Pyt
ii  python-glade2                 2.14.1-1   GTK+ bindings: Glade support
ii  python-gobject                2.16.1-1   Python bindings for the GObject li
ii  python-gtk2                   2.14.1-1   Python bindings for the GTK+ widge

Versions of packages gaupol recommends:
ii  iso-codes                     3.7-1      ISO language, territory, currency,
ii  python-chardet                1.0.1-1.1  universal character encoding detec
pn  python-enchant                <none>     (no description available)

Versions of packages gaupol suggests:
ii  mplayer         1:1.0.rc2svn20090316-0.1 The Ultimate Movie Player For Linu

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: gaupol
Source-Version: 0.15-1

this bug was fixed upstream in Gaupol 0.15, I forgot to close it in the
changelog

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply via email to