diff options
| author | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-09-06 14:16:15 +0900 |
|---|---|---|
| committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-09-12 11:42:08 +0900 |
| commit | 894bc5d6d219509e69c7761afcd4f399036306e7 (patch) | |
| tree | 5a20197a757f779265300fe1da7797d21cecd085 /pygerrit/stream.py | |
| parent | d8db31b4e99afef93534c84254e49036b348b905 (diff) | |
| download | pygerrit-894bc5d6d219509e69c7761afcd4f399036306e7.tar.gz | |
Fix event registration from other module
The purpose of the `register` decorator in the event factory is
to allow client scripts to define their own event classes and
have them dispatched when monitoring the event stream.
The current implementation does not work when an event class is
registered from another module, because it uses globals() which
only returns the symbols defined in the event module, so trying
to instantiate the object causes an exception.
Change the implementation to also store the module name when
registering, and then use that when instantiating the event
object.
Add unit tests to cover the event registration functionality.
Change-Id: I1af901621b07fc9236bc95a81956269507994871
Diffstat (limited to 'pygerrit/stream.py')
0 files changed, 0 insertions, 0 deletions
