Package: python-gobject
Version: 2.14.2-1
Severity: grave
Tags: patch
Justification: renders package unusable

Python app using pygtk fails with the error message as follows:

[n...@nickl ~]$ sudo image-creator
Traceback (most recent call last):
  File "/usr/sbin/image-creator", line 51, in <module>
    import gui
  File "/usr/share/pdk/lib/gui.py", line 24, in <module>
    import pygtk
  File "/var/lib/python-support/python2.5/pygtk.py", line 41
    dir = os.getcwd()
                    ^
TabError: inconsistent use of tabs and spaces in indentation
[n...@nickl ~]$ ls -l /var/lib/python-support/python2.5/pygtk.py
lrwxrwxrwx 1 root root 49 2008-06-19 11:44 
/var/lib/python-support/python2.5/pygtk.py -> 
/usr/share/python-support/python-gobject/pygtk.py

Error arises because Python has significant leading whitespace but this
file pygtk.py is not consistent in its use of tabs versus spaces.

Patch is attached which fixes this problem.


-- System Information:
Debian Release: 5.0.1
  APT prefers stable
  APT policy: (800, 'stable'), (500, 'oldstable'), (3, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/1 CPU core)
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-gobject depends on:
ii  libc6                    2.7-18          GNU C Library: Shared libraries
ii  libffi5                  3.0.7-1         Foreign Function Interface library
ii  libglib2.0-0             2.16.6-1+lenny1 The GLib library of C routines
ii  python                   2.5.2-3         An interactive high-level object-o
ii  python-support           0.8.4           automated rebuilding support for P
ii  python2.5                2.5.2-15        An interactive high-level object-o

python-gobject recommends no packages.

Versions of packages python-gobject suggests:
pn  python-gobject-dbg            <none>     (no description available)

-- no debconf information
--- pygtk.py.orig	2008-06-07 14:41:19.000000000 +0100
+++ pygtk.py	2009-05-06 11:37:34.000000000 +0100
@@ -38,7 +38,7 @@
     versions = {}
     for dir in sys.path:
         if not dir: 
-  	    dir = os.getcwd()
+            dir = os.getcwd()
             
         if not os.path.isdir(dir):
             continue
@@ -58,8 +58,8 @@
             if not os.listdir(pathname):
                 continue
             
-	    if not versions.has_key(filename[-3:]):
-            	versions[filename[-3:]] = pathname
+            if not versions.has_key(filename[-3:]):
+                versions[filename[-3:]] = pathname
     return versions
 
 def require20():

Reply via email to