File tree Expand file tree Collapse file tree
openstackclient/compute/v2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1520,17 +1520,6 @@ def _show_progress(progress):
15201520
15211521 if not image and parsed_args .image_properties :
15221522
1523- def emit_duplicated_warning (img ):
1524- img_uuid_list = [str (image .id ) for image in img ]
1525- LOG .warning (
1526- 'Multiple matching images: %(img_uuid_list)s\n '
1527- 'Using image: %(chosen_one)s' ,
1528- {
1529- 'img_uuid_list' : img_uuid_list ,
1530- 'chosen_one' : img_uuid_list [0 ],
1531- },
1532- )
1533-
15341523 def _match_image (image_api , wanted_properties ):
15351524 image_list = image_api .images ()
15361525 images_matched = []
@@ -1568,7 +1557,15 @@ def _match_image(image_api, wanted_properties):
15681557
15691558 images = _match_image (image_client , parsed_args .image_properties )
15701559 if len (images ) > 1 :
1571- emit_duplicated_warning (images , parsed_args .image_properties )
1560+ img_uuid_list = [str (image .id ) for image in images ]
1561+ LOG .warning (
1562+ 'Multiple matching images: %(img_uuid_list)s\n '
1563+ 'Using image: %(chosen_one)s' ,
1564+ {
1565+ 'img_uuid_list' : img_uuid_list ,
1566+ 'chosen_one' : img_uuid_list [0 ],
1567+ },
1568+ )
15721569 if images :
15731570 image = images [0 ]
15741571 else :
You can’t perform that action at this time.
0 commit comments