PyTransportNSWv2 0.5.2__tar.gz → 0.5.3__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.2
3
+ Version: 0.5.3
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.2
3
+ Version: 0.5.3
4
4
  Summary: Get detailed per-trip transport information from TransportNSW
5
5
  Home-page: https://github.com/andystewart999/TransportNSW
6
6
  Author: andystewart999
@@ -290,15 +290,18 @@ class TransportNSWv2(object):
290
290
  found_journeys = found_journeys + 1
291
291
 
292
292
  # Add to the return array
293
- if (found_journeys == journeys_to_return) or (no_valid_journeys == True):
293
+ if (no_valid_journeys == True):
294
294
  break
295
+
296
+ if (found_journeys >= 2):
297
+ json_output = json_output + ',' + json.dumps(self.info)
295
298
  else:
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)
299
+ json_output = json_output + json.dumps(self.info)
300
+
301
+ if (found_journeys == journeys_to_return):
302
+ break
300
303
 
301
- current_journey = next_journey
304
+ current_journey = next_journey
302
305
 
303
306
  json_output='{"journeys_to_return": ' + str(self.journeys_to_return) + ', "journeys_with_data": ' + str(found_journeys) + ', "journeys": [' + json_output + ']}'
304
307
  return json_output
@@ -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.2",
8
+ version="0.5.3",
9
9
  author="andystewart999",
10
10
  description="Get detailed per-trip transport information from TransportNSW",
11
11
  long_description=long_description,