ignore ignore; add infinite loop test that catched KeyboardInterrupt
This commit is contained in:
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from time import sleep
|
||||
|
||||
|
||||
def run():
|
||||
try:
|
||||
n = 0
|
||||
while True:
|
||||
print(f"\tTest Infinite Loop with sigint: {n}")
|
||||
n += 1
|
||||
sleep(0.3)
|
||||
except KeyboardInterrupt:
|
||||
print("\tTest Infinite Loop with sigint: bye bye!")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user