This commit is contained in:
deathbybandaid 2019-05-09 11:00:13 -04:00
parent 6a710e2b96
commit 8cc4d68378

View File

@ -70,14 +70,7 @@ def errordisplay_fetch(bot):
servicepid = get_running_pid(bot)
debuglines = []
for line in os.popen(str("sudo journalctl _PID=" + str(servicepid))).read().split('\n'):
if not str(line).startswith("-- Logs begin at"):
line = str(line).split(str(os.uname()[1] + " "))[-1]
if not str(line).startswith("sudo"):
lineparts = str(line).split(": ")
del lineparts[0]
line = spicemanip.main(lineparts, 0)
debuglines.append(str(line))
else:
if not str(line).startswith("sudo") and not line.isspace():
debuglines.append(str(line))
return debuglines