Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
arihant2math committed May 26, 2023
1 parent 885184d commit 7d7d180
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ actions: # actions are per ship
- orbit
- extract:
fail-fast: false
- dock
- navigate:
destination:
trait: "MARKETPLACE"
Expand Down
1 change: 1 addition & 0 deletions spacelang/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,5 @@ def load_text(stream):

logging.getLogger("requests").setLevel(logging.WARNING)
logging.getLogger("urllib3").setLevel(logging.WARNING)
logging.getLogger("pyrate_limiter").setLevel(logging.WARNING)
logging.basicConfig(format='[%(threadName)s] %(levelname)s: %(message)s', level=logging.DEBUG)
2 changes: 1 addition & 1 deletion spacelang/step/navigate.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ def execute(self, ship, session):
if str(accepted.symbol) != str(ship.nav.location):
ship.navigate(str(accepted.symbol))
ship.update()
if ship.nav.status == "IN_TRANSIT":
if ship.nav.moving:
time.sleep((ship.nav.route.arrival - datetime.now(timezone.utc)).seconds)
6 changes: 3 additions & 3 deletions spacelang/step/ship_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ def execute(self, ship: Ship):
if self.fail_fast:
raise e
else:
logging.warning(self.command + " failed to execute")
logging.warning(self.command + " failed to execute, " + str(e))
elif self.command == "extract":
try:
ship.refuel()
ship.extract()
except IOError as e:
if self.fail_fast:
raise e
else:
logging.warning(self.command + " failed to execute")
logging.warning(self.command + " failed to execute, " + str(e))

0 comments on commit 7d7d180

Please sign in to comment.