rsync now works with Python 2.5 and 2.6 (not just 2.7)

This commit is contained in:
Tom Keffer
2013-04-13 14:44:23 +00:00
parent 0f9e075f34
commit 34dd39e66e
2 changed files with 6 additions and 3 deletions

View File

@@ -79,9 +79,10 @@ class RsyncUpload(object):
cmd.extend([rsyncremotespec])
try:
syslog.syslog(syslog.LOG_DEBUG, "rsyncupload: rsync invocation: %s" % " ".join(cmd))
output = subprocess.check_output(cmd)
stroutput = output.encode("utf-8")
rsynccmd = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
stdout = rsynccmd.communicate()[0]
stroutput = stdout.encode("utf-8")
syslog.syslog(syslog.LOG_DEBUG, "rsyncupload: rsync reported:\n%s" % stroutput)
except OSError, e:
if e.errno == errno.ENOENT:

View File

@@ -6,6 +6,8 @@ weewx change history
Fixed bug that prevented Fine Offset stations from downloading archive
records if the archive database had no records in it.
rsync should now work with Python 2.5 and 2.6 (not just 2.7)
2.3.0 04/10/13