Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples/guided.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2020-10-18 21:19:08 +0200
committerAnton Hvornum <anton.feeds+github@gmail.com>2020-10-18 21:19:08 +0200
commitad2adec8343a1cf8dfcd68e472d8dc4720717038 (patch)
tree0b86e260066b1707ed803f56248c4b4461221cd8 /examples/guided.py
parent2df4347b44ff6e45ed6b4a66332efae51056c2ef (diff)
Reverted some changes. It was to 'complicated' to get status of the sys.stdin buffer while it did not contain a new-line character. So reverted that code. Here is an interesting read, but a bit to much code for a simple guided template: https://stackoverflow.com/a/41459565/929999
Diffstat (limited to 'examples/guided.py')
-rw-r--r--examples/guided.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 067d591f..b3df07d7 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -1,6 +1,5 @@
import archinstall
import getpass, time, json, sys, signal
-from select import epoll, EPOLLIN
"""
This signal-handler chain (and global variable)
@@ -166,8 +165,6 @@ print()
print(f' ! Formatting {harddrive} in ', end='')
-poller = epoll()
-poller.register(sys.stdin.fileno(), EPOLLIN)
for i in range(5, 0, -1):
print(f"{i}", end='')
@@ -176,7 +173,7 @@ for i in range(5, 0, -1):
time.sleep(0.25)
print(".", end='')
- if list(poller.poll(0.25)) or SIG_TRIGGER:
+ if SIG_TRIGGER:
abort = input('\nDo you really want to abort (y/n)? ')
if abort.strip() != 'n':
exit(0)