jhbuild r1956 - in trunk: . scripts
- From: fpeters svn gnome org
- To: svn-commits-list gnome org
- Subject: jhbuild r1956 - in trunk: . scripts
- Date: Tue, 18 Mar 2008 12:28:43 +0000 (GMT)
Author: fpeters
Date: Tue Mar 18 12:28:42 2008
New Revision: 1956
URL: http://svn.gnome.org/viewvc/jhbuild?rev=1956&view=rev
Log:
* scripts/hg-update.py: use subprocess module from jhbuild.cut_n_paste
for Python < 2.4. (closes: #523150)
Modified:
trunk/ChangeLog
trunk/scripts/hg-update.py
Modified: trunk/scripts/hg-update.py
==============================================================================
--- trunk/scripts/hg-update.py (original)
+++ trunk/scripts/hg-update.py Tue Mar 18 12:28:42 2008
@@ -21,7 +21,14 @@
import os
import sys
import re
-from subprocess import Popen, call, PIPE, STDOUT
+
+try:
+ from subprocess import Popen, call, PIPE, STDOUT
+except ImportError: # Python < 2.4 lacks subprocess module
+ sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
+ from jhbuild.cut_n_paste import subprocess
+ print 'subprocess module:', subprocess
+ sys.modules['subprocess'] = subprocess
def get_parent():
hg = Popen(['hg', 'parents', '--template', '{rev}'], stdout=PIPE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]