Modify

Opened 6 years ago

Closed 6 years ago

#8307 closed defect (fixed)

Fails when no pubkeys yet in keyring

Reported by: Rob Guttman Owned by: Steffen Hoffmann
Priority: normal Component: AnnouncerPlugin
Severity: normal Keywords:
Cc: Robert Corsaro Trac Release: 0.12

Description

Traceback from log:

2010-12-13 15:49:01,391 Trac[api] ERROR: AnnouncementSystem failed.
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/api.py", line 560, in _real_send
    evt)
  File "/usr/local/lib/python2.6/dist-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/distributors/mail.py", line 324, in distribute
    pubkey_ids = self.enigma.get_pubkey_ids(addr)
  File "/usr/local/lib/python2.6/dist-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/util/mail_crypto.py", line 108, in get_pubkey_ids
    return pubkey_ids
UnboundLocalError: local variable 'pubkey_ids' referenced before assignment

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by Rob Guttman

Moving line 95 to line 91 of util/mail_crypto.py fixes the problem. This is the line that should be moved:

        pubkey_ids = []

comment:2 in reply to:  1 Changed 6 years ago by Steffen Hoffmann

Owner: changed from Robert Corsaro to Steffen Hoffmann
Status: newassigned

Replying to robguttman:

Moving line 95 to line 91 of util/mail_crypto.py fixes the problem. ![...]

Sure, silly mistake of mine. Will commit this tonight. Thanks for testing.

comment:3 Changed 6 years ago by Steffen Hoffmann

Cc: Robert Corsaro added; Steffen Hoffmann removed

comment:4 Changed 6 years ago by Steffen Hoffmann

Resolution: fixed
Status: assignedclosed

(In [9674]) TracAnnouncer: Make required variable declatation unconditional, closes #8307.

Thanks to Rob Guttman for spotting this and proposing the fix.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.