Revision 43ee6ae1 kamaki/cli/commands/image_cli.py

b/kamaki/cli/commands/image_cli.py
57 57
                or self.config.get('compute', 'url')\
58 58
                or self.config.get('global', 'url')
59 59
            self.client = ImageClient(base_url=base_url, token=token)
60
        except ClientError as err:
60
        except Exception as err:
61 61
            raiseCLIError(err)
62 62

  
63 63

  
......
100 100
        detail = self.get_argument('detail')
101 101
        try:
102 102
            images = self.client.list_public(detail, filters, order)
103
        except ClientError as err:
103
        except Exception as err:
104 104
            raiseCLIError(err)
105 105
        print_items(images, title=('name',))
106 106

  
......
177 177
                self.client.reregister(location, name, params, properties)
178 178
            else:
179 179
                self.client.register(name, location, params, properties)
180
        except ClientError as err:
180
        except Exception as err:
181 181
            raiseCLIError(err)
182 182

  
183 183

  
......
189 189
        super(self.__class__, self).main()
190 190
        try:
191 191
            members = self.client.list_members(image_id)
192
        except ClientError as err:
192
        except Exception as err:
193 193
            raiseCLIError(err)
194 194
        for member in members:
195 195
            print(member['member_id'])
......
203 203
        super(self.__class__, self).main()
204 204
        try:
205 205
            images = self.client.list_shared(member)
206
        except ClientError as err:
206
        except Exception as err:
207 207
            raiseCLIError(err)
208 208
        for image in images:
209 209
            print(image['image_id'])
......
217 217
        super(self.__class__, self).main()
218 218
        try:
219 219
            self.client.add_member(image_id, member)
220
        except ClientError as err:
220
        except Exception as err:
221 221
            raiseCLIError(err)
222 222

  
223 223

  
......
229 229
        super(self.__class__, self).main()
230 230
        try:
231 231
            self.client.remove_member(image_id, member)
232
        except ClientError as err:
232
        except Exception as err:
233 233
            raiseCLIError(err)
234 234

  
235 235

  
......
241 241
        super(self.__class__, self).main()
242 242
        try:
243 243
            self.client.set_members(image_id, member)
244
        except ClientError as err:
244
        except Exception as err:
245 245
            raiseCLIError(err)
246 246

  
247 247

  
......
267 267
        super(self.__class__, self).main()
268 268
        try:
269 269
            images = self.client.list_images(self.get_argument('detail'))
270
        except ClientError as err:
270
        except Exception as err:
271 271
            raiseCLIError(err)
272 272
        self._print(images)
273 273

  
......
286 286
        super(self.__class__, self).main()
287 287
        try:
288 288
            image = self.client.get_image_details(image_id)
289
        except ClientError as err:
289
        except Exception as err:
290 290
            raiseCLIError(err)
291 291
        self._print(image)
292 292

  
......
299 299
        super(self.__class__, self).main()
300 300
        try:
301 301
            self.client.delete_image(image_id)
302
        except ClientError as err:
302
        except Exception as err:
303 303
            raiseCLIError(err)
304 304

  
305 305

  
......
311 311
        super(self.__class__, self).main()
312 312
        try:
313 313
            reply = self.client.get_image_metadata(image_id, key)
314
        except ClientError as err:
314
        except Exception as err:
315 315
            raiseCLIError(err)
316 316
        print_dict(reply)
317 317

  
......
324 324
        super(self.__class__, self).main()
325 325
        try:
326 326
            reply = self.client.create_image_metadata(image_id, key, val)
327
        except ClientError as err:
327
        except Exception as err:
328 328
            raiseCLIError(err)
329 329
        print_dict(reply)
330 330

  
......
338 338
        metadata = {key: val}
339 339
        try:
340 340
            reply = self.client.update_image_metadata(image_id, **metadata)
341
        except ClientError as err:
341
        except Exception as err:
342 342
            raiseCLIError(err)
343 343
        print_dict(reply)
344 344

  
......
351 351
        super(self.__class__, self).main()
352 352
        try:
353 353
            self.client.delete_image_metadata(image_id, key)
354
        except ClientError as err:
354
        except Exception as err:
355 355
            raiseCLIError(err)

Also available in: Unified diff