Hi,
I found fix for this problem. 
In initialize function I do self.a = ReviewRequestDropdownHook(....)
and later in shutdown function self.a.actions.[0].unregister().

It seems like RB doesn't do unregister for actions. 

On Saturday, November 11, 2017 at 7:05:25 AM UTC+1, Christian Hammond wrote:
>
> Hi,
>
> Thanks for the report! We'll look into the cause, make sure it's fixed for 
> 3.0.
>
> Christian
>
>
> On Fri, Nov 10, 2017 at 08:05 SHKLO O <misb...@gmail.com <javascript:>> 
> wrote:
>
>> Hi, I have an extension which uses ReviewRequestDropdownActionHook just 
>> to show button which I use to call JS function.  
>> The extension turns on without a problem but when you Disable and Enable 
>> it again it shows following error "*KeyError: u'test_link **(that's id 
>> of ActionHook written in ReviewRequestActionHook>)** already corresponds 
>> to a registered review request action*'"
>>
>> When I don't Disable it but try to use the extension it sometimes shows 
>> the error immediately, sometimes in a few seconds.
>>
>> The problem started after switching to RB 3.0
>>
>> Here's what Initialization looks like in extension.py initialize function:
>>
>> ReviewRequestDropdownActionHook(self, [{
>>     'label': 'Test',
>>     'items': [{
>>         'url': '#',
>>         'id': 'test_link',
>>         'label': 'Test',
>>     }]
>> }])
>>
>> -- 
>> Supercharge your Review Board with Power Pack: 
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons: 
>> https://rbcommons.com/
>> Happy user? Let us know! https://www.reviewboard.org/users/
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "reviewboard" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to reviewboard...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
> -- 
> Christian Hammond
> President/CEO of Beanbag
> Makers of Review Board
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to