Skip to content

Commit

Permalink
additional check in command_scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
marcin-usielski committed Mar 20, 2019
1 parent d201e06 commit 85e0910
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion moler/command_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def _wait_for_slot_for_command(self, cmd):
while cmd.timeout >= (time.time() - start_time):
time.sleep(0.005)
with lock:
if conn_atr['current_cmd'] is None and cmd == conn_atr['queue'][0]:
if conn_atr['current_cmd'] is None and len(conn_atr['queue']) >= 1 and cmd == conn_atr['queue'][0]:
conn_atr['queue'].pop(0)
conn_atr['current_cmd'] = cmd
cmd._log(logging.DEBUG,
Expand Down

0 comments on commit 85e0910

Please sign in to comment.