migration to python3 (#1)
[osm/vim-emu.git] / src / emuvim / api / openstack / openstack_dummies / glance_dummy_api.py
index 1b066f0..8d85974 100755 (executable)
@@ -137,7 +137,7 @@ class GlanceListImagesApi(Resource):
         except Exception as ex:
             LOG.exception(
                 u"%s: Could not retrieve the list of images." % __name__)
         except Exception as ex:
             LOG.exception(
                 u"%s: Could not retrieve the list of images." % __name__)
-            return ex.message, 500
+            return str(ex), 500
 
     def post(self):
         """
 
     def post(self):
         """
@@ -226,7 +226,7 @@ class GlanceImageByIdApi(Resource):
         except Exception as ex:
             LOG.exception(
                 u"%s: Could not retrieve image with id %s." % (__name__, id))
         except Exception as ex:
             LOG.exception(
                 u"%s: Could not retrieve image with id %s." % (__name__, id))
-            return Response(ex.message, status=500,
+            return Response(str(ex), status=500,
                             mimetype='application/json')
 
     def put(self, id):
                             mimetype='application/json')
 
     def put(self, id):
@@ -259,5 +259,5 @@ class GlanceImageByDockerNameApi(Resource):
         except Exception as ex:
             logging.exception(
                 u"%s: Could not retrieve image with id %s." % (__name__, id))
         except Exception as ex:
             logging.exception(
                 u"%s: Could not retrieve image with id %s." % (__name__, id))
-            return Response(ex.message, status=500,
+            return Response(str(ex), status=500,
                             mimetype='application/json')
                             mimetype='application/json')