summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/Svn.py
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2009-02-20 21:56:47 +0000
committerSol Jerome <solj@ices.utexas.edu>2009-02-20 21:56:47 +0000
commitabc364013de96b1ff0170b65665388ed8ca3e07f (patch)
tree04e1b5c369edc905fea4e785cbbadc207a670571 /src/lib/Server/Plugins/Svn.py
parent202a3aec707802a85bbf5bfbf82e86a0317c2bbb (diff)
downloadbcfg2-abc364013de96b1ff0170b65665388ed8ca3e07f.tar.gz
bcfg2-abc364013de96b1ff0170b65665388ed8ca3e07f.tar.bz2
bcfg2-abc364013de96b1ff0170b65665388ed8ca3e07f.zip
os.popen is deprecated in 2.6 (http://docs.python.org/library/os.html#os.popen)
Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5088 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/Svn.py')
-rw-r--r--src/lib/Server/Plugins/Svn.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/Server/Plugins/Svn.py b/src/lib/Server/Plugins/Svn.py
index 269c3173b..2cdbecb99 100644
--- a/src/lib/Server/Plugins/Svn.py
+++ b/src/lib/Server/Plugins/Svn.py
@@ -1,4 +1,5 @@
import os
+from subprocess import Popen, PIPE
import Bcfg2.Server.Plugin
# for debugging output only
@@ -31,8 +32,9 @@ class Svn(Bcfg2.Server.Plugin.Plugin,
def get_revision(self):
'''Read svn revision information for the bcfg2 repository'''
try:
- data = os.popen("env LC_ALL=C svn info %s" \
- % (self.datastore)).readlines()
+ data = Popen(("env LC_ALL=C svn info %s" %
+ (self.datastore)), shell=True,
+ stdout=PIPE).stdout.readlines()
revline = [line.split(': ')[1].strip() for line in data \
if line[:9] == 'Revision:'][-1]
revision = revline