Flake8 in bin/*
Address flake8 issues in the bin directory: * wrong indents * Unneeded imports Change-Id: I183eefc2ff13ed019ab2a041658e6d71a1fa1f57
This commit is contained in:
parent
90fd87fdc9
commit
94a3b20ff9
@ -34,8 +34,9 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(
|
possible_topdir = os.path.normpath(os.path.join
|
||||||
sys.argv[0]), os.pardir, os.pardir))
|
(os.path.abspath(sys.argv[0]),
|
||||||
|
os.pardir, os.pardir))
|
||||||
if os.path.exists(os.path.join(possible_topdir, "manila", "__init__.py")):
|
if os.path.exists(os.path.join(possible_topdir, "manila", "__init__.py")):
|
||||||
sys.path.insert(0, possible_topdir)
|
sys.path.insert(0, possible_topdir)
|
||||||
|
|
||||||
@ -51,7 +52,7 @@ CONF = cfg.CONF
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
CONF(sys.argv[1:], project='manila',
|
CONF(sys.argv[1:], project='manila',
|
||||||
version=version.version_string())
|
version=version.version_string())
|
||||||
logging.setup("manila")
|
logging.setup("manila")
|
||||||
LOG = logging.getLogger('manila.all')
|
LOG = logging.getLogger('manila.all')
|
||||||
|
|
||||||
|
@ -31,8 +31,9 @@ import sys
|
|||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
|
||||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(
|
possible_topdir = os.path.normpath(os.path.join
|
||||||
sys.argv[0]), os.pardir, os.pardir))
|
(os.path.abspath(sys.argv[0]),
|
||||||
|
os.pardir, os.pardir))
|
||||||
if os.path.exists(os.path.join(possible_topdir, "manila", "__init__.py")):
|
if os.path.exists(os.path.join(possible_topdir, "manila", "__init__.py")):
|
||||||
sys.path.insert(0, possible_topdir)
|
sys.path.insert(0, possible_topdir)
|
||||||
|
|
||||||
@ -48,7 +49,7 @@ CONF = cfg.CONF
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
CONF(sys.argv[1:], project='manila',
|
CONF(sys.argv[1:], project='manila',
|
||||||
version=version.version_string())
|
version=version.version_string())
|
||||||
logging.setup("manila")
|
logging.setup("manila")
|
||||||
utils.monkey_patch()
|
utils.monkey_patch()
|
||||||
server = service.WSGIService('osapi_share')
|
server = service.WSGIService('osapi_share')
|
||||||
|
@ -58,11 +58,6 @@ from __future__ import print_function
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import uuid
|
|
||||||
|
|
||||||
from sqlalchemy import create_engine, MetaData, Table
|
|
||||||
from sqlalchemy.ext.declarative import declarative_base
|
|
||||||
from sqlalchemy.orm import sessionmaker
|
|
||||||
|
|
||||||
|
|
||||||
# If ../manila/__init__.py exists, add ../ to Python search path, so that
|
# If ../manila/__init__.py exists, add ../ to Python search path, so that
|
||||||
@ -82,7 +77,6 @@ from manila.common import config # Need to register global_opts
|
|||||||
from manila import context
|
from manila import context
|
||||||
from manila import db
|
from manila import db
|
||||||
from manila.db import migration
|
from manila.db import migration
|
||||||
from manila import exception
|
|
||||||
from manila.openstack.common import log as logging
|
from manila.openstack.common import log as logging
|
||||||
from manila.openstack.common import uuidutils
|
from manila.openstack.common import uuidutils
|
||||||
from manila import utils
|
from manila import utils
|
||||||
@ -418,7 +412,7 @@ def main():
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
CONF(sys.argv[1:], project='manila',
|
CONF(sys.argv[1:], project='manila',
|
||||||
version=version.version_string())
|
version=version.version_string())
|
||||||
logging.setup("manila")
|
logging.setup("manila")
|
||||||
except cfg.ConfigFilesNotFoundError:
|
except cfg.ConfigFilesNotFoundError:
|
||||||
cfgfile = CONF.config_file[-1] if CONF.config_file else None
|
cfgfile = CONF.config_file[-1] if CONF.config_file else None
|
||||||
|
@ -47,7 +47,7 @@ CONF = cfg.CONF
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
CONF(sys.argv[1:], project='manila',
|
CONF(sys.argv[1:], project='manila',
|
||||||
version=version.version_string())
|
version=version.version_string())
|
||||||
logging.setup("manila")
|
logging.setup("manila")
|
||||||
utils.monkey_patch()
|
utils.monkey_patch()
|
||||||
server = service.Service.create(binary='manila-scheduler')
|
server = service.Service.create(binary='manila-scheduler')
|
||||||
|
@ -46,16 +46,15 @@ CONF = cfg.CONF
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
args = CONF(sys.argv[1:], project='manila',
|
args = CONF(sys.argv[1:], project='manila',
|
||||||
version=version.version_string())
|
version=version.version_string())
|
||||||
logging.setup("manila")
|
logging.setup("manila")
|
||||||
utils.monkey_patch()
|
utils.monkey_patch()
|
||||||
launcher = service.ProcessLauncher()
|
launcher = service.ProcessLauncher()
|
||||||
if CONF.enabled_share_backends:
|
if CONF.enabled_share_backends:
|
||||||
for backend in CONF.enabled_share_backends:
|
for backend in CONF.enabled_share_backends:
|
||||||
host = "%s@%s" % (CONF.host, backend)
|
host = "%s@%s" % (CONF.host, backend)
|
||||||
server = service.Service.create(
|
server = service.Service.create(host=host,
|
||||||
host=host,
|
service_name=backend)
|
||||||
service_name=backend)
|
|
||||||
launcher.launch_server(server)
|
launcher.launch_server(server)
|
||||||
else:
|
else:
|
||||||
server = service.Service.create(binary='manila-share')
|
server = service.Service.create(binary='manila-share')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user