Package: python-central
Version: 0.6.11
Severity: important
Tags: patch

Hello, this problem may be more severy than just important. An invocation of 
dh_pycentral
by dpkg-buildpackage and CDBS with debian/rules only being

#!/usr/bin/make -f
export DEB_PYTHON_SYSTEM=pycentral
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk

led to

Traceback (most recent call last):                                              
                                                                       
  File "/usr/bin/pycentral", line 2096, in <module>                             
                                                                       
    main()                                                                      
                                                                       
  File "/usr/bin/pycentral", line 2090, in main                                 
                                                                       
    rv = action.run(global_options)                                             
                                                                       
  File "/usr/bin/pycentral", line 1947, in run                                  
                                                                       
    pkg.read_pyfiles()                                                          
                                                                       
  File "/usr/bin/pycentral", line 357, in read_pyfiles                          
                                                                       
    lines.append(os.path.join(d, name))                                         
                                                                       
UnboundLocalError: local variable 'd' referenced before assignment              
                                                                       

and me producing the following (apparently working but I don't know what I was 
truly doing)
patch

--- /tmp/orig   2009-06-20 12:14:06.501359540 +0200
+++ /usr/bin/pycentral  2009-06-20 12:14:30.209357195 +0200
@@ -353,8 +353,8 @@
                 if root != self.pkgdir:
                     d = root[len(self.pkgdir):]
                     lines.append(d)
-                for name in files:
-                    lines.append(os.path.join(d, name))
+                    for name in files:
+                        lines.append(os.path.join(d, name))
         else:
             config_file = '/usr/share/pyshared-data/%s' % self.name
             if self.pkgconfig:

so, the loop that depends on d was just rendered a part of the "if"
to get access to d.

Kind regards,

Steffen


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

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

Versions of packages python-central depends on:
ii  python                        2.5.4-2    An interactive high-level object-o

python-central recommends no packages.

python-central suggests no packages.

-- no debconf information



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

Reply via email to