summaryrefslogtreecommitdiffstats
path: root/doctor_tests/image.py
diff options
context:
space:
mode:
authordongwenjuan <dong.wenjuan@zte.com.cn>2017-12-21 16:11:31 +0800
committerdongwenjuan <dong.wenjuan@zte.com.cn>2018-01-09 09:37:39 +0800
commit754b94bba6df6e7aafd5f1ffb8432a40cb815649 (patch)
tree4bbe2f725e5b378bbd8f1b12cbbbb173afb203b2 /doctor_tests/image.py
parentbdbd22904733af311225a3315555bb39ea12ed55 (diff)
support pep8 check
Change-Id: I3c4358694c57d27a207ae60712c44f717c8895f7 Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
Diffstat (limited to 'doctor_tests/image.py')
-rw-r--r--doctor_tests/image.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/doctor_tests/image.py b/doctor_tests/image.py
index 2e313e12..9961b22d 100644
--- a/doctor_tests/image.py
+++ b/doctor_tests/image.py
@@ -28,7 +28,7 @@ OPTS = [
help='the name of image file',
required=True),
cfg.StrOpt('image_download_url',
- default='https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img',
+ default='https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img', # noqa
help='the url where to get the image',
required=True),
]
@@ -53,10 +53,12 @@ class Image(object):
resp = urllib.request.urlopen(self.conf.image_download_url)
with open(self.conf.image_filename, "wb") as file:
file.write(resp.read())
- self.image = self.glance.images.create(name=self.conf.image_name,
- disk_format=self.conf.image_format,
- container_format="bare",
- visibility="public")
+ self.image = \
+ self.glance.images.create(
+ name=self.conf.image_name,
+ disk_format=self.conf.image_format,
+ container_format="bare",
+ visibility="public")
self.glance.images.upload(self.image['id'],
open(self.conf.image_filename, 'rb'))
else: