diff options
| author | 2018-12-18 20:30:10 +0000 | |
|---|---|---|
| committer | 2018-12-18 20:30:10 +0000 | |
| commit | aea215a647f290e1c48af7752e88f69b66f0bddb (patch) | |
| tree | dbb0099da005e5efb49c505cab6d8ecdf5bef917 /modules/nr.py | |
| parent | NR: fix regression introduced by HTTP util changes (diff) | |
| signature | ||
NR: DEM is technically a permitted powertype
Diffstat (limited to 'modules/nr.py')
| -rw-r--r-- | modules/nr.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/nr.py b/modules/nr.py index 0bfcc557..b6780add 100644 --- a/modules/nr.py +++ b/modules/nr.py @@ -142,7 +142,7 @@ class Module(ModuleManager.BaseModule): "time": ("", lambda x: len(x)==4 and x.isdigit()), "date": ("", lambda x: len(x)==10), "tops": (None, lambda x: len(x)<4 and x.isdigit()), - "power": (None, lambda x: x.upper() in ["EMU", "DMU", "HST", "D", "E"], lambda x: x.upper()), + "power": (None, lambda x: x.upper() in ["EMU", "DMU", "HST", "D", "E", "DEM"], lambda x: x.upper()), "crs": (False, lambda x: type(x)==type(True)), "st": (False, lambda x: type(x)==type(True)) }) @@ -351,7 +351,7 @@ class Module(ModuleManager.BaseModule): if schedule: sources.append("Eagle/SCHEDULE") if not query: query = {"trainid": schedule["signalling_id"] or "0000", "operator": schedule["operator_name"] or schedule["atoc_code"]} - stype = "%s %s" % (schedule_query["tops_inferred"], schedule["power_type"]) if schedule_query["tops_inferred"] else schedule["power_type"] + stype = "%s %s" % (schedule_query.data["tops_inferred"], schedule["power_type"]) if schedule_query.data["tops_inferred"] else schedule["power_type"] for k,v in { "operatorCode": schedule["atoc_code"], "serviceType": stype if stype else SCHEDULE_STATUS[schedule["status"]], |
