commit | 7ccda8c5c173a7b44f97cfe2aca6740c004b13f4 | [log] [tgz] |
---|---|---|
author | Jaroslav Henner <jhenner@redhat.com> | Mon Dec 03 16:25:25 2012 +0100 |
committer | Jaroslav Henner <jhenner@redhat.com> | Mon Dec 03 20:00:34 2012 +0100 |
tree | 85a65aff98dedaa64f419b00a4d9c7fb8c31a26e | |
parent | af6fca5d69b5a5528f4d7b7027f579709b2bd5fa [diff] |
Simplify parse_image_id. Change-Id: I7915e7a9f252da84fa76cec282c546444afa7c59
diff --git a/tempest/common/utils/data_utils.py b/tempest/common/utils/data_utils.py index 15afd0a..c5d5c7e 100644 --- a/tempest/common/utils/data_utils.py +++ b/tempest/common/utils/data_utils.py
@@ -58,9 +58,7 @@ def parse_image_id(image_ref): """Return the image id from a given image ref""" - temp = image_ref.rsplit('/') - #Return the last item, which is the image id - return temp[len(temp) - 1] + return image_ref.rsplit('/')[-1] def arbitrary_string(size=4, base_text=None):