PyTransportNSWv2 0.5.1__tar.gz → 0.5.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyTransportNSWv2
3
- Version: 0.5.1
3
+ Version: 0.5.2
4
4
  Summary: Get detailed per-trip transport information from TransportNSW
5
5
  Home-page: https://github.com/andystewart999/TransportNSW
6
6
  Author: andystewart999
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyTransportNSWv2
3
- Version: 0.5.1
3
+ Version: 0.5.2
4
4
  Summary: Get detailed per-trip transport information from TransportNSW
5
5
  Home-page: https://github.com/andystewart999/TransportNSW
6
6
  Author: andystewart999
@@ -291,13 +291,16 @@ class TransportNSWv2(object):
291
291
 
292
292
  # Add to the return array
293
293
  if (found_journeys == journeys_to_return) or (no_valid_journeys == True):
294
- json_output = json_output + json.dumps(self.info) + ']}'
295
- json_output='{"journeys_to_return": ' + str(self.journeys_to_return) + ', "journeys_with_data": ' + str(found_journeys) + ', "journeys": [' + json_output
296
294
  break
297
295
  else:
298
- json_output = json_output + json.dumps(self.info) + ', '
296
+ if (found_journeys >= 2):
297
+ json_output = json_output + ',' + json.dumps(self.info)
298
+ else:
299
+ json_output = json_output + json.dumps(self.info)
300
+
299
301
  current_journey = next_journey
300
302
 
303
+ json_output='{"journeys_to_return": ' + str(self.journeys_to_return) + ', "journeys_with_data": ' + str(found_journeys) + ', "journeys": [' + json_output + ']}'
301
304
  return json_output
302
305
 
303
306
 
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setuptools.setup(
7
7
  name="PyTransportNSWv2",
8
- version="0.5.1",
8
+ version="0.5.2",
9
9
  author="andystewart999",
10
10
  description="Get detailed per-trip transport information from TransportNSW",
11
11
  long_description=long_description,