Skip to content

Commit

Permalink
Merge pull request #89 from Luos-io/assert
Browse files Browse the repository at this point in the history
Add assert management, resolve Luos-io/luos#63
  • Loading branch information
Nicolas Rabault authored Dec 4, 2020
2 parents c7dd9dc + 9462636 commit a12c8d3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions pyluos/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,13 @@ def _update(self, new_state):
alias = new_state['dead_container']
if hasattr(self, alias):
getattr(self, alias)._kill()
if 'assert' in new_state :
# A node assert, print assert informations
if (('node_id' in new_state['assert']) and ('file' in new_state['assert']) and ('line' in new_state['assert'])):
s = "************************* ASSERT *************************\n"
s += "* Node " + str(new_state['assert']['node_id']) + " assert in file " + new_state['assert']['file'] + " line " + str(new_state['assert']['line'])
s += "\n**********************************************************"
print (s)
if 'containers' not in new_state:
return

Expand Down
2 changes: 1 addition & 1 deletion pyluos/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '1.3.1'
version = '1.4.0'

0 comments on commit a12c8d3

Please sign in to comment.