Package: moap
Version: 0.2.6-1
Severity: normal
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

When running "moap bug" without a moap file, I get a backtrace:

% moap bug
No .doap file found in /data/jelmer/python/trunk.
Traceback (most recent call last):
  File "/usr/bin/moap", line 28, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/lib/python2.5/site-packages/moap/main.py", line 13, in main
    ret = c.parse(argv)
  File "/usr/lib/python2.5/site-packages/moap/extern/command/command.py", line 
265, in parse
    return self.subCommands[command].parse(args[1:])
  File "/usr/lib/python2.5/site-packages/moap/extern/command/command.py", line 
218, in parse
    ret = self.handleOptions(self.options)
  File "/usr/lib/python2.5/site-packages/moap/command/bug.py", line 114, in 
handleOptions
    if not d:
UnboundLocalError: local variable 'd' referenced before assignment

The attached patch fixes the problem for me.

- -- System Information:
Debian Release: lenny/sid
  APT prefers gutsy
  APT policy: (500, 'gutsy'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (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/dash

Versions of packages moap depends on:
ii  python                      2.5.2-2      An interactive high-level object-o
ii  python-central              0.6.8        register and build utility for Pyt
ii  python-librdf               1.0.7.1-1+b1 Python language bindings for the R

Versions of packages moap recommends:
ii  exuberant-ctags               1:5.7-4    build tag file indexes of source c
ii  python-cheetah                2.0.1-2    text-based template engine and Pyt
ii  python-genshi                 0.5.0-1    Python XML-based template engine
ii  python-twisted-core           8.1.0-3    Event-based framework for internet
ii  python-yahoo                  3.1-1.1    Python module for the Yahoo Search

moap suggests no packages.

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iJwEAQECAAYFAkiywZoACgkQDLQl4QYPZuVa4QP/UH78MaWgjJa2EymmkksvpRgi
wP2YuL/UBiEQXTMiUbVhDnyHNX0AZEau1VIlqdcJe6lboGwNGO7TNqi2hqK12yfR
vpyMqvMGIGYXTbYtLXShiwNOGmDx5BLhFHoGYZVZdhbidC4Wb/kgiqN8TCpCcBfU
/2t+QYp5if9JHZSgfns=
=IRBV
-----END PGP SIGNATURE-----
--- /usr/lib/python2.5/site-packages/moap/command/bug.py        2008-08-25 
16:25:13.000000000 +0200
+++ bug.py      2008-08-25 16:25:06.000000000 +0200
@@ -109,6 +109,7 @@
                 try:
                     d = doap.findDoapFile(None)
                 except doap.DoapException, e:
+                    d = None
                     sys.stderr.write(e.args[0])
 
             if not d:

Reply via email to