Skip to content

Commit

Permalink
Fix wrong sleep interval when quite flag is set
Browse files Browse the repository at this point in the history
  • Loading branch information
SkypLabs committed Aug 15, 2023
1 parent 5330970 commit 4820f26
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions hdlcontroller/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,11 @@ def receive_callback(data):
hdlc_c.set_receive_callback(receive_callback)
hdlc_c.start()

if args["quiet"]:
while True:
sleep(1)
else:
while True:
while True:
if not args["quiet"]:
hdlc_c.send(args["message"])
sleep(args["interval"])

sleep(args["interval"])
except KeyboardInterrupt:
stdout.write("[*] Bye!\n")
finally:
Expand Down

0 comments on commit 4820f26

Please sign in to comment.