Add check to make sure dopy is at least version 0.2.2 for digital_ocean module

reviewable/pr18780/r1
Daniel Koch 11 years ago
parent a650b899c6
commit 5d02fb6ca1

@ -160,9 +160,14 @@ import os
import time import time
try: try:
import dopy
from dopy.manager import DoError, DoManager from dopy.manager import DoError, DoManager
except ImportError as e: 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) sys.exit(1)
class TimeoutError(DoError): class TimeoutError(DoError):

Loading…
Cancel
Save