Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2019-04-10 18:17:16 +0200
committerAnton Hvornum <anton.feeds@gmail.com>2019-04-10 18:17:16 +0200
commit1726a597aa323887980e41823df41b704376b075 (patch)
tree805265131e0f545e39346c5d926918df1c3f5b79 /archinstall.py
parent64f5dd30bb4f89cadf7640e04cdad27315896a50 (diff)
Testing a thing
Diffstat (limited to 'archinstall.py')
-rw-r--r--archinstall.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/archinstall.py b/archinstall.py
index 59cdde3b..b1bfeb59 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -114,10 +114,12 @@ def run(cmd, echo=False, opts=None, *args, **kwargs):
if not opts: opts = {}
if echo or 'debug' in opts:
print('[!] {}'.format(cmd))
- handle = Popen(cmd, shell='True', stdout=PIPE, stderr=STDOUT, **kwargs)
+ handle = Popen(cmd, shell='True', stdout=PIPE, stderr=STDOUT, stdin=PIPE **kwargs)
output = b''
while handle.poll() is None:
data = handle.stdout.read()
+ if b'or press Control-D' in data:
+ handle.stdin.write(b'')
if len(data):
if echo or 'debug' in opts:
print(data.decode('UTF-8'), end='')
@@ -127,6 +129,7 @@ def run(cmd, echo=False, opts=None, *args, **kwargs):
if echo or 'debug' in opts:
print(data.decode('UTF-8'), end='')
output += data
+ handle.stdin.close()
handle.stdout.close()
return output