Fix for flake8 issues

- D202 No blank lines allowed after function docstring
 - D205 1 blank line required between summary line and description
 - H405 multi line docstring summary not separated with an empty line
 - H201 no 'except:' at least use 'except Exception:'
 - H233 Python 3.x incompatible use of print operator

 Please read OpenStack Style Guidelines
 (http://docs.openstack.org/developer/hacking/)

Change-Id: I0dd92cdd30fc2a89d60a38eb419320f7e13b61ce
This commit is contained in:
Ruslan Khozinov 2016-08-24 23:19:58 +03:00
parent 34e702888d
commit ab780644fc
3 changed files with 4 additions and 6 deletions

View File

@ -33,7 +33,6 @@ msg = "Plugin couldn't be enabled. Check plugin version. Test aborted"
def install_manila_plugin(master_node_ip):
"""Install plugin packages to the master node."""
utils.upload_tarball(
master_node_ip,
MANILA_PLUGIN_PATH, "/var")
@ -44,10 +43,10 @@ def install_manila_plugin(master_node_ip):
def upload_manila_image(master_node_ip, image_dest_path):
"""Copy Manila qcow2 image to the master node.
:type master_node_ip: string master-node ip
:type image_dest_path: string destination path
"""
logger.info(image_dest_path)
try:
logger.info("Start to upload manila image file")
@ -63,7 +62,7 @@ def upload_manila_image(master_node_ip, image_dest_path):
logger.info('File {} was uploaded on master'.format(dest_path))
return dest_path
except:
except Exception:
logger.error('Failed to upload file')
logger.error(traceback.format_exc())
return False

View File

@ -19,4 +19,3 @@ MANILA_PLUGIN_VERSION = os.environ.get('MANILA_PLUGIN_VERSION')
MANILA_PLUGIN_PATH = os.environ.get('MANILA_PLUGIN_PATH')
MANILA_IMAGE_PATH = os.environ.get('MANILA_IMAGE_PATH')
plugin_name = 'fuel-plugin-manila'

View File

@ -173,7 +173,7 @@ class TestManilaSmoke(TestBasic):
path
)
print manila_image
print (manila_image)
assert_true(
manila_image,
"Upload of manila image to master node fail"
@ -256,7 +256,7 @@ class TestManilaSmoke(TestBasic):
self.ssh_manager.admin_ip,
path
)
print manila_image
print (manila_image)
assert_true(
manila_image,
"Upload of manila image to master node fail"