summaryrefslogtreecommitdiff
path: root/scripts/cxmanage
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/cxmanage')
-rwxr-xr-xscripts/cxmanage16
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/cxmanage b/scripts/cxmanage
index 606a85f..0535408 100755
--- a/scripts/cxmanage
+++ b/scripts/cxmanage
@@ -42,6 +42,8 @@ import pkg_resources
from cxmanage.controller import Controller
+PYIPMI_VERSION = '0.4.0'
+
# Load plugins
PREFIX = 'cxmanage_plugin'
PLUGINS = [__import__(x[1]) for x in pkgutil.iter_modules()
@@ -283,19 +285,19 @@ def main():
def check_versions():
"""Check versions of dependencies"""
# Check pyipmi version
- required_pyipmi_version = '0.3.0'
try:
- pyipmi_version = pkg_resources.require('pyipmi')[0].version
- if pyipmi_version != required_pyipmi_version:
- print 'ERROR: cxmanage requires pyipmi version %s'\
- % required_pyipmi_version
- print 'Current pyipmi version is %s' % pyipmi_version
- sys.exit(1)
+ pkg_resources.require('pyipmi>=%s' % PYIPMI_VERSION)
except pkg_resources.DistributionNotFound:
print 'ERROR: cxmanage requires pyipmi version %s'\
% required_pyipmi_version
print 'No existing version was found.'
sys.exit(1)
+ except pkg_resources.VersionConflict:
+ version = pkg_resources.require('pyipmi')[0].version
+ print 'ERROR: cxmanage requires pyipmi version %s' % PYIPMI_VERSION
+ print 'Current pyipmi version is %s' % version
+ sys.exit(1)
+
# Check ipmitool version
if 'IPMITOOL_PATH' in os.environ: