Attachments not working

Bug #517674 reported by Javier Collado
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox
Fix Released
High
Marc Tardif

Bug Description

Attachments aren't working in checkbox because of the following error:
=======
2010-02-05 17:32:22,377 ERROR Error running event handler None.AttachmentInfo.report() for event type 'report' with args () {}.
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/checkbox/reactor.py", line 89, in fire
    results.append(handler(*args, **kwargs))
  File "/usr/share/checkbox/plugins/attachment_info.py", line 65, in report
    if not attachment.get("depends", []):
UnboundLocalError: local variable 'attachment' referenced before assignment
=======

apparently the problem was introduced in revision 748 in the following lines:
========
    def report(self):
        attachments = []
        iterator = JobIterator(self._attachments, self._manager.registry)
        for job in iterator:
            if not attachment.get("depends", []):
                job = Job(attachment["command"], attachment.get("environ"),
                    attachment.get("timeout"))
                (status, data, duration) = job.execute()
                attachment = dict(attachment)
                attachment["data"] = data
                attachment["duration"] = duration
                attachment["status"] = status
                attachments.append(attachment)
========

Related branches

Changed in checkbox:
status: New → Confirmed
David Murphy (schwuk)
Changed in checkbox:
status: Confirmed → Fix Committed
milestone: none → 0.9-featurefreeze
Marc Tardif (cr3)
Changed in checkbox:
assignee: nobody → Marc Tardif (cr3)
importance: Undecided → High
Revision history for this message
Javier Collado (javier.collado) wrote :

I believe this is already solved since the proposed branch was merged.

Marc Tardif (cr3)
Changed in checkbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.