Skip to content

Commit 6580620

Browse files
committed
More generic fix
1 parent b795025 commit 6580620

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

gtfsrthttp2mqtt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def doGTFSRTPolling(self):
118118
full_topic = '{0}/{1}///{2}/{3}/{4}/{5}/{6}/{7}/{8}/{9}/{10}/{11}/{12}/{13}/{14}/{15}/'.format(
119119
self.baseMqttTopic, self.feedName, mode, route_id, direction_id,
120120
trip_headsign, trip_id, stop_id, start_time, vehicle_id, geohash_head, geohash_firstdeg,
121-
geohash_seconddeg, geohash_thirddeg, short_name, color)
121+
geohash_seconddeg, geohash_thirddeg, short_name, color).replace("+","").replace("#", "")
122122

123123
sernmesg = nfeedmsg.SerializeToString()
124124
self.client.publish(full_topic, sernmesg)

utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def parse_short_name(feed, trip_id, route_id, otp_data):
2727
feed_scoped_id = "OULU:" + trip_id
2828
if feed_scoped_id not in otp_data:
2929
return ""
30-
return otp_data[feed_scoped_id]["route"]["shortName"].replace("+","")
30+
return otp_data[feed_scoped_id]["route"]["shortName"]
3131

3232
feed_scoped_id = feed + ":" + route_id
3333
if feed_scoped_id not in otp_data:

0 commit comments

Comments
 (0)