Commit 5e4fa5b8 by John Jarvis

indent

parent 85a9d13e
......@@ -30,6 +30,10 @@ class MongoConnection:
def __init__(self):
try:
mongo = MongoClient(host=args.mongo_host, port=args.mongo_port)
except ConnectionFailure:
print "Unable to connect to the mongo database specified"
sys.exit(1)
mongo_db = getattr(mongo, args.mongo_db)
if args.mongo_ami_collection not in mongo_db.collection_names():
mongo_db.create_collection(args.mongo_ami_collection)
......@@ -48,10 +52,6 @@ class MongoConnection:
'vars': extra_vars,
}
except ConnectionFailure:
print "Unable to connect to the mongo database specified"
sys.exit(1)
def update_ami(self, status, ami=None):
"""
Creates a new document in the AMI
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment