Skip to content

Commit

Permalink
[bugfix] pilot NAME cant be blank, more informative error message
Browse files Browse the repository at this point in the history
  • Loading branch information
sneakers-the-rat committed Oct 28, 2021
1 parent d547bcc commit 35113b8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions autopilot/networking/station.py
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,9 @@ def __init__(self):

#self.id = prefs.get('NAME').encode('utf-8')
self.id = prefs.get('NAME')
if self.id is None or self.id == '':
self.logger.exception(f"pilot NAME in prefs.json cannot be blank, got {self.id}")
raise ValueError(f"pilot NAME in prefs.json cannot be blank, got {self.id}")
self.pi_id = "_{}".format(self.id)
self.subject = None # Store current subject ID
self.state = 'IDLE' # store current pi state
Expand Down

0 comments on commit 35113b8

Please sign in to comment.