diff options
author | Sol Jerome <solj@ices.utexas.edu> | 2009-02-20 21:56:47 +0000 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2009-02-20 21:56:47 +0000 |
commit | abc364013de96b1ff0170b65665388ed8ca3e07f (patch) | |
tree | 04e1b5c369edc905fea4e785cbbadc207a670571 /src/lib/Server/Plugins/Git.py | |
parent | 202a3aec707802a85bbf5bfbf82e86a0317c2bbb (diff) | |
download | bcfg2-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/Git.py')
-rw-r--r-- | src/lib/Server/Plugins/Git.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/Server/Plugins/Git.py b/src/lib/Server/Plugins/Git.py index 1c17c8e47..6cb089de6 100644 --- a/src/lib/Server/Plugins/Git.py +++ b/src/lib/Server/Plugins/Git.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 Git(Bcfg2.Server.Plugin.Plugin, def get_revision(self): '''Read git revision information for the bcfg2 repository''' try: - data = os.popen("env LC_ALL=C git ls-remote %s" % - (self.datastore)).readlines() + data = Popen(("env LC_ALL=C git ls-remote %s" % + (self.datastore)), shell=True, + stdout=PIPE).stdout.readlines() revline = [line.split('\t')[0].strip() for line in data if \ line.split('\t')[1].strip() == 'refs/heads/master'][-1] revision = revline |