Modify

Opened 4 years ago

Closed 4 years ago

#8307 closed defect (fixed)

Fails when no pubkeys yet in keyring

Reported by: robguttman Owned by: hasienda
Priority: normal Component: AnnouncerPlugin
Severity: normal Keywords:
Cc: doki_pen 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 follow-up: Changed 4 years ago by robguttman

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 4 years ago by hasienda

  • Owner changed from doki_pen to hasienda
  • Status changed from new to assigned

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 4 years ago by hasienda

  • Cc doki_pen added; hasienda removed

comment:4 Changed 4 years ago by hasienda

  • Resolution set to fixed
  • Status changed from assigned to closed

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

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

Add Comment

Modify Ticket

Action
as closed The owner will remain hasienda.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.