Skip to content

Commit 10453e0

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Revert "Don't look up project by id if given id""
2 parents 3cb4e9c + 85254fb commit 10453e0

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

openstackclient/image/v2/image.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
from osc_lib.command import command
3030
from osc_lib import exceptions
3131
from osc_lib import utils
32-
from oslo_utils import uuidutils
3332

3433
from openstackclient.common import progressbar
3534
from openstackclient.i18n import _
@@ -184,14 +183,11 @@ def take_action(self, parsed_args):
184183
image_client = self.app.client_manager.image
185184
identity_client = self.app.client_manager.identity
186185

187-
if uuidutils.is_uuid_like(parsed_args.project):
188-
project_id = parsed_args.project
189-
else:
190-
project_id = common.find_project(
191-
identity_client,
192-
parsed_args.project,
193-
parsed_args.project_domain,
194-
).id
186+
project_id = common.find_project(
187+
identity_client,
188+
parsed_args.project,
189+
parsed_args.project_domain,
190+
).id
195191

196192
image = image_client.find_image(
197193
parsed_args.image, ignore_missing=False

0 commit comments

Comments
 (0)