Package: lastfmsubmitd
Version: 0.28-1
Severity: important
Tags: patch

I get this error while trying to queue information to be submitted to
last.fm

ERROR: Aborting: Traceback (most recent call last):
  File "/usr/lib/lastfmsubmitd/lastfmsubmit", line 68, in ?
    sub['title'] = decode(arg)
NameError: name 'decode' is not defined

I found that from 0.26 to 0.28 the 'def decode' disappeared, so i took
the snippet from 0.26 and added it again, and it worked again.

*** /var/tmp/lastfmsubmit-0.28  Sat May  6 22:01:14 2006
--- /var/tmp/lastfmsubmit-0.26  Sat May  6 22:21:45 2006
***************
*** 59,64 ****
--- 59,71 ----
          print >>sys.stderr, 'log: %s' % e
          sys.exit(1)

+     def decode(s):
+         try:
+             return s.decode('utf-8')
+         except UnicodeDecodeError:
+ log.warning('Attempting to decode tag as %s' % encoding)
+             return s.decode(encoding)
+
      try:
          for opt, arg in opts:
              try:


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (900, 'unstable'), (899, 'testing'), (898, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16.13
Locale: LANG=C, [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages lastfmsubmitd depends on:
ii adduser 3.87 Add and remove users and groups
ii python 2.3.5-5 An interactive high-level object-o

Versions of packages lastfmsubmitd recommends:
pn python-mpdclient <none> (no description available)
pn python-musicbrainz <none> (no description available)

-- no debconf information

--
BOFH excuse #79:

Look, buddy:  Windows 3.1 IS A General Protection Fault.


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

Reply via email to