[Python-modules-team] Bug#568757: python-xdg: xdg.BaseDirectory doesn’t follow the spec in one corner case

Éric Araujo merwok at netwok.org
Sun Feb 7 15:45:53 UTC 2010


Package: python-xdg
Version: 0.18-1
Severity: important
Tags: patch

Hello

According to the XDG BaseDir Spec at
<http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html>:

    If $XDG_DATA_HOME is either not set or empty, a default equal to
    $HOME/.local/share should be used. 

However, the Python code contains this, which doesn't do the right thing if
one var is defined but empty (i.e. it will return an empty sting instead of the
default value):

    xdg_data_home = os.environ.get('XDG_DATA_HOME',
                os.path.join(_home, '.local', 'share'))

Attached path fixes this.

Kind regards


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

Kernel: Linux 2.6.32-trunk-686 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-xdg depends on:
ii  python                        2.5.4-9    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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pyxdg-0.18.diff
Type: text/x-java
Size: 1225 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20100207/b4c8e26b/attachment.java>


More information about the Python-modules-team mailing list