[Fusionforge-commits] r13496 - branches/Branch_5_0/gforge/cronjobs

Olivier Meunier musicoliv at fusionforge.org
Fri Jun 10 15:04:19 CEST 2011


Author: musicoliv
Date: 2011-06-10 15:04:19 +0200 (Fri, 10 Jun 2011)
New Revision: 13496

Modified:
   branches/Branch_5_0/gforge/cronjobs/hot-backup.py
Log:
Python 2.6 has deprecated popen3. Replaced calls to this function by suprocess.Popen (requires python >= 2.4)

Modified: branches/Branch_5_0/gforge/cronjobs/hot-backup.py
===================================================================
--- branches/Branch_5_0/gforge/cronjobs/hot-backup.py	2011-06-10 13:04:04 UTC (rev 13495)
+++ branches/Branch_5_0/gforge/cronjobs/hot-backup.py	2011-06-10 13:04:19 UTC (rev 13496)
@@ -22,7 +22,7 @@
 
 ######################################################################
 
-import sys, os, shutil, string, re
+import sys, os, shutil, string, re, subprocess
 
 ######################################################################
 # Global Settings
@@ -89,7 +89,11 @@
 
 ### Step 1: get the youngest revision.
 
-infile, outfile, errfile = os.popen3(svnlook + " youngest " + repo_dir)
+p = subprocess.Popen([svnlook, 'youngest', repo_dir],
+                     stdin=subprocess.PIPE,
+                     stdout=subprocess.PIPE,
+                     stderr=subprocess.PIPE)
+infile, outfile, errfile = p.stdin, p.stdout, p.stderr
 stdout_lines = outfile.readlines()
 stderr_lines = errfile.readlines()
 outfile.close()




More information about the Fusionforge-commits mailing list