From fb7c58ba27d5fc2b397e660900c3152df72ac53c Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 10 Oct 2011 20:22:40 +0000 Subject: got rsync uplading of log working svn path=/trunk/; revision=15563 --- scripts/check-for-type-punning-warnings.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'scripts') diff --git a/scripts/check-for-type-punning-warnings.py b/scripts/check-for-type-punning-warnings.py index cf4f7136..3ac48e0c 100755 --- a/scripts/check-for-type-punning-warnings.py +++ b/scripts/check-for-type-punning-warnings.py @@ -3,6 +3,7 @@ import smtplib import glob import datetime +import subprocess date = datetime.datetime.now().strftime("%Y-%m-%d") outputfilename = 'type-punning.log' @@ -42,14 +43,15 @@ mailoutput.append('http://autobuild.puredata.info/auto-build/' + date + '/logs/' # upload the log file to the autobuild website rsyncfile = 'rsync://128.238.56.50/upload/' + date + '/logs/' + outputfilename -try: - p = subprocess.Popen(['rsync', '-ax', outputfile, rsyncfile], - stdout=subprocess.PIPE, stderr=subprocess.STDOUT).wait() -except: - mailoutput.append('rsync upload of the log failed!\n') -# mailoutput.append(''.join(p.stdout.readlines())) - - +cmd = ['rsync', '-axv', outputfile, rsyncfile] +mailoutput.append(str(cmd)) +p = subprocess.Popen(cmd, + shell=False, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) +p.wait() +mailoutput.append(''.join(p.stdout.readlines())) +mailoutput.append(''.join(p.stderr.readlines())) mailoutput.append('______________________________________________________________________\n\n') server = smtplib.SMTP('in1.smtp.messagingengine.com') -- cgit v1.2.1