Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2019-11-29 17:10:04 +0100
committerAnton Hvornum <anton.feeds+github@gmail.com>2019-11-29 17:10:04 +0100
commit198c47333ea93083e141146ceb60d1166914df6e (patch)
tree4d643828a691afd8ddaf1620bc319253deb05487
parentfc196a589ba2f83cbc188ffe0e7f7c48da05ec3f (diff)
Debugging
-rw-r--r--archinstall.py5
-rw-r--r--deployments/default.json4
2 files changed, 5 insertions, 4 deletions
diff --git a/archinstall.py b/archinstall.py
index 07205096..74e22898 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -322,16 +322,17 @@ class sys_command():#Thread):
del(self.kwargs['events'][trigger])
trigger = bytes(key, 'UTF-8')
self.kwargs['events'][trigger] = self.kwargs['events'][key]
+ if type(self.kwargs['events'][key]) != bytes:
+ self.kwargs['events'][key] = bytes(self.kwargs['events'][key], 'UTF-8')
if trigger.lower() in self.trace_log[last_trigger_pos:].lower():
trigger_pos = self.trace_log[last_trigger_pos:].lower().find(trigger.lower())
if 'debug' in self.kwargs and self.kwargs['debug']:
+ print(f"Writing to subprocess {self.cmd[0]}: {self.kwargs['events'][trigger].decode('UTF-8')}")
log(f"Writing to subprocess {self.cmd[0]}: {self.kwargs['events'][trigger].decode('UTF-8')}", origin='spawn', level=5)
last_trigger_pos = trigger_pos
- if type(self.kwargs['events'][trigger]) != bytes:
- self.kwargs['events'][trigger] = bytes(self.kwargs['events'][trigger], 'UTF-8')
os.write(child_fd, self.kwargs['events'][trigger])
del(self.kwargs['events'][trigger])
broke = True
diff --git a/deployments/default.json b/deployments/default.json
index 78ea5472..cd205f84 100644
--- a/deployments/default.json
+++ b/deployments/default.json
@@ -6,8 +6,8 @@
"post" : {
"test exit codes" : {
"ssh test@77.80.220.176" : {"events" : {
- "continue connecting" : "yes",
- "s password" : "test"
+ "continue connecting" : "yes\n",
+ "s password" : "test\n"
},
"boot" : true,
"debug" : true