diff options
| author | 2018-09-27 11:46:10 +0100 | |
|---|---|---|
| committer | 2018-09-27 11:46:10 +0100 | |
| commit | 8b0314b190b02f7e83fe0dae3c349ce4dffdcb4f (patch) | |
| tree | 2481de34452598ff3d3ca579612a0fdc0dc0edc5 /modules/nr.py | |
| parent | Implement @Utils.export, to denote an export on a module (diff) | |
| signature | ||
Use ModuleManager.BaseModule in more modules
Diffstat (limited to 'modules/nr.py')
| -rw-r--r-- | modules/nr.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/modules/nr.py b/modules/nr.py index 4d953d82..ee0f3379 100644 --- a/modules/nr.py +++ b/modules/nr.py @@ -2,7 +2,7 @@ import collections, re, time from datetime import datetime, date from collections import Counter -from src import Utils +from src import ModuleManager, Utils from suds.client import Client from suds import WebFault @@ -14,16 +14,13 @@ from suds import WebFault URL = 'https://lite.realtime.nationalrail.co.uk/OpenLDBSVWS/wsdl.aspx?ver=2016-02-16' -class Module(object): +class Module(ModuleManager.BaseModule): _name = "NR" + _client = None PASSENGER_ACTIVITIES = ["U", "P", "R"] COLOURS = [Utils.COLOR_LIGHTBLUE, Utils.COLOR_GREEN, Utils.COLOR_RED, Utils.COLOR_CYAN, Utils.COLOR_LIGHTGREY, Utils.COLOR_ORANGE] - def __init__(self, bot, events, exports): - self.bot = bot - self._client = None - @property def client(self): if self._client: return self._client |
