diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2011-10-10 20:22:40 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2011-10-10 20:22:40 +0000 |
commit | fb7c58ba27d5fc2b397e660900c3152df72ac53c (patch) | |
tree | f7fe187ffd01ff9e74e26eb6ac69cdec0f4cfd00 /scripts | |
parent | a9d69bfbee19358d64811ae542fc4f65a3e7df03 (diff) |
got rsync uplading of log working
svn path=/trunk/; revision=15563
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check-for-type-punning-warnings.py | 18 |
1 files changed, 10 insertions, 8 deletions
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') |