[Python-modules-team] Bug#563718: python-xdg: Mime content matching error
Tony Houghton
h at realh.co.uk
Mon Jan 4 20:17:39 UTC 2010
Package: python-xdg
Version: 0.18-1
Severity: normal
Attempting to use Mime.get_type_by_data() throws an exception:
File "/home/tony/vixn/vixn/langs.py", line 144, in guess_filetype
mime_type = xdgmime.get_type_by_data(text)
File "/usr/lib/pymodules/python2.5/xdg/Mime.py", line 401, in get_type_by_data
return magic.match_data(data, max_pri, min_pri)
File "/usr/lib/pymodules/python2.5/xdg/Mime.py", line 287, in match_data
m=type.match(buf)
NameError: global name 'buf' is not defined
I think the code should have "data" in place of "buf". It looks as if
this would also fail on all calls of get_type_by_contents() and some
calls of get_type().
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.31-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages python-xdg depends on:
ii python 2.5.4-5 An interactive high-level object-o
ii python-support 1.0.6 automated rebuilding support for P
python-xdg recommends no packages.
python-xdg suggests no packages.
-- no debconf information
More information about the Python-modules-team
mailing list