From 5d9f260eb21ecde1babed2cea36a6e29a1a1b985 Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Fri, 1 Aug 2008 10:19:21 +0000 Subject: [PATCH] print yum.__version__ instead of executing "yum --version" which is very heavyweighted in recent versions and gives out additional informations confusing the parser git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2752 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- scripts/vyum-worker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vyum-worker b/scripts/vyum-worker index 346dab1..03e9568 100755 --- a/scripts/vyum-worker +++ b/scripts/vyum-worker @@ -56,7 +56,7 @@ Execution will continue in 5 seconds..." yum=${YUM:-yum} conf=yum.conf -case $($yum --version|tail -n 1) in +case $(python -c "import yum; print yum.__version__" 2>/dev/null) in (2.[012345]*) check 'import yum,sys; sys.exit(not hasattr(yum.config.yumconf, "getRootedPath"))' ;; -- 1.8.1.5