Update commander.py

This commit is contained in:
Richard Bronkhorst 2023-06-11 21:33:17 +02:00
parent 2346b610a3
commit 5e4b17f574

View File

@ -54,6 +54,8 @@ class Commander(CommandLine):
def all_specials(self, waypoints): def all_specials(self, waypoints):
for w in waypoints: for w in waypoints:
if self.stop_auto:
break
if 'MARKETPLACE' in w.traits: if 'MARKETPLACE' in w.traits:
self.api.marketplace(w) self.api.marketplace(w)
print(f'marketplace at {w}') print(f'marketplace at {w}')
@ -72,10 +74,11 @@ class Commander(CommandLine):
self.stop_auto = False self.stop_auto = False
data = self.api.list_systems(1) data = self.api.list_systems(1)
pages = total_pages(self.api.last_meta) pages = total_pages(self.api.last_meta)
print(f'{pages} pages of systems')
print(f'page {1}: {len(data)} results') print(f'page {1}: {len(data)} results')
self.all_waypoints(data) self.all_waypoints(data)
print(f'{pages} more pages of systems')
for p in range(2, pages): for p in range(2, pages):
if self.stop_auto: if self.stop_auto:
break break