From cdc5e04d7b98eea4682423d0c78c9b56bd639dee Mon Sep 17 00:00:00 2001 From: Daniel Koch Date: Wed, 2 Oct 2013 20:29:35 -0400 Subject: [PATCH] Add check to make sure dopy is at least version 0.2.2 for digital_ocean module --- library/cloud/digital_ocean | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/library/cloud/digital_ocean b/library/cloud/digital_ocean index 8009575bb0..9404b14958 100644 --- a/library/cloud/digital_ocean +++ b/library/cloud/digital_ocean @@ -160,9 +160,14 @@ import os import time try: + import dopy from dopy.manager import DoError, DoManager except ImportError as e: - print "failed=True msg='dopy required for this module'" + print "failed=True msg='dopy >= 0.2.2 required for this module'" + sys.exit(1) + +if dopy.__version__ < '0.2.2': + print "failed=True msg='dopy >= 0.2.2 required for this module'" sys.exit(1) class TimeoutError(DoError):