Skip to content
Browse files

check boto version

  • Loading branch information...
1 parent 8cdde9b commit b2b47e2883febf1d781c414729ecbd379f2bf1a6 @barnybug committed Sep 11, 2012
Showing with 11 additions and 2 deletions.
  1. +11 −2 scripts/cli53
View
13 scripts/cli53
@@ -9,8 +9,6 @@ import itertools
from cStringIO import StringIO
from time import sleep
-# needs latest boto from github: http://github.com/boto/boto
-# git clone git://github.com/boto/boto
try:
import boto.route53, boto.jsonresponse, boto.exception
except ImportError, ex:
@@ -19,6 +17,17 @@ except ImportError, ex:
print "(error was: %s)" % ex
sys.exit(-1)
+# check boto version
+m = re.match('(\d+)\.(\d+)(?:\.(\d+)|b\d+)', boto.__version__)
+if m:
+ major, minor, other = m.groups()
+ major = int(major)
+ minor = int(minor)
+ if major < 2 or minor < 1:
+ print "Please update boto %s >= 2.1.0" % boto.__version__
+ print "pip install --upgrade boto"
+ sys.exit(-1)
+
import argparse
from argparse import ArgumentTypeError
from types import StringTypes

0 comments on commit b2b47e2

Please sign in to comment.
Something went wrong with that request. Please try again.