Commit 99c0af9c authored by Seblu's avatar Seblu
Browse files

Move debug of message into send_message

parent 7b7bf4b9
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -169,6 +169,7 @@ class LocalPackage(dict):
	)
	)


def send_message(msg):
def send_message(msg):
	debug(msg)
	proc = Popen(["sendmail", "-i", "-t"], stdin=PIPE, close_fds=True)
	proc = Popen(["sendmail", "-i", "-t"], stdin=PIPE, close_fds=True)
	proc.stdin.write(msg.as_bytes())
	proc.stdin.write(msg.as_bytes())
	proc.stdin.close()
	proc.stdin.close()
@@ -188,7 +189,6 @@ def send_build_report(config, localpkg, aurpkg, status, logfile):
	with open(logfile, "r") as fd:
	with open(logfile, "r") as fd:
		mt = MIMEText(fd.read())
		mt = MIMEText(fd.read())
	msg.attach(mt)
	msg.attach(mt)
	debug(msg)
	send_message(msg)
	send_message(msg)


def send_maintainer_report(config, localpkg, aurpkg):
def send_maintainer_report(config, localpkg, aurpkg):
@@ -207,7 +207,6 @@ def send_maintainer_report(config, localpkg, aurpkg):
	msg["From"] = config.get("from", "Aurbot")
	msg["From"] = config.get("from", "Aurbot")
	msg["To"] = config["notify"]
	msg["To"] = config["notify"]
	msg["Date"] = formatdate(localtime=True)
	msg["Date"] = formatdate(localtime=True)
	debug(msg)
	send_message(msg)
	send_message(msg)


def update(config, localpkg, aurpkg):
def update(config, localpkg, aurpkg):