[mousetrap/gnome3-wip: 128/240] Update Plugin interface reflect that constructor must take a Config.
- From: Heidi Ellis <heidiellis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mousetrap/gnome3-wip: 128/240] Update Plugin interface reflect that constructor must take a Config.
- Date: Mon, 8 Sep 2014 15:23:19 +0000 (UTC)
commit e1260cfc55aef8d8570b6fbf900e17bbe3c35ab1
Author: Stoney Jackson <dr stoney gmail com>
Date: Mon Jun 23 14:54:44 2014 -0400
Update Plugin interface reflect that constructor must take a Config.
src/mousetrap/plugins/interface.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/mousetrap/plugins/interface.py b/src/mousetrap/plugins/interface.py
index 15c3176..695a69c 100644
--- a/src/mousetrap/plugins/interface.py
+++ b/src/mousetrap/plugins/interface.py
@@ -1,4 +1,9 @@
class Plugin(object):
+ def __init__(self, config):
+ '''Override to initialize and configure yourself.
+ (Do not call parent/this constructor.)'''
+ raise NotImplementedError('Must implement.')
+
def run(self, app):
'''Called each pass of the loop.'''
raise NotImplementedError('Must implement.')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]