Update version.py and ChangeLog for 0.6.1
[snf-image-creator] / image_creator / kamaki_wrapper.py
index af588c4..07df8d9 100644 (file)
@@ -38,16 +38,21 @@ The library is used to upload images to and register them with a Synnefo
 deployment.
 """
 
+import sys
+
 from os.path import basename
 
 from kamaki.cli.config import Config
 from kamaki.clients import ClientError
 from kamaki.clients.image import ImageClient
 from kamaki.clients.pithos import PithosClient
-from kamaki.clients.astakos import AstakosClient
-
+from kamaki.clients.astakos import CachedAstakosClient as AstakosClient
 
-config = Config()
+try:
+    config = Config()
+except Exception as e:
+    sys.stderr.write("Kamaki config error: %s\n" % str(e))
+    sys.exit(1)
 
 
 class Kamaki(object):
@@ -163,7 +168,7 @@ class Kamaki(object):
                                       self.CONTAINER, path)
 
     def register(self, name, location, metadata, public=False):
-        """Register an image to ~okeanos"""
+        """Register an image with cyclades"""
 
         # Convert all metadata to strings
         str_metadata = {}