From 94a3b20ff90ebcbe8cc1a8d07cae5b1820e67f47 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 14 Aug 2014 13:11:21 +0200 Subject: [PATCH] Flake8 in bin/* Address flake8 issues in the bin directory: * wrong indents * Unneeded imports Change-Id: I183eefc2ff13ed019ab2a041658e6d71a1fa1f57 --- bin/manila-all | 7 ++++--- bin/manila-api | 7 ++++--- bin/manila-manage | 8 +------- bin/manila-scheduler | 2 +- bin/manila-share | 7 +++---- 5 files changed, 13 insertions(+), 18 deletions(-) diff --git a/bin/manila-all b/bin/manila-all index 1a376173c5..016701d762 100755 --- a/bin/manila-all +++ b/bin/manila-all @@ -34,8 +34,9 @@ import os import sys from oslo.config import cfg -possible_topdir = os.path.normpath(os.path.join(os.path.abspath( - sys.argv[0]), os.pardir, os.pardir)) +possible_topdir = os.path.normpath(os.path.join + (os.path.abspath(sys.argv[0]), + os.pardir, os.pardir)) if os.path.exists(os.path.join(possible_topdir, "manila", "__init__.py")): sys.path.insert(0, possible_topdir) @@ -51,7 +52,7 @@ CONF = cfg.CONF if __name__ == '__main__': CONF(sys.argv[1:], project='manila', - version=version.version_string()) + version=version.version_string()) logging.setup("manila") LOG = logging.getLogger('manila.all') diff --git a/bin/manila-api b/bin/manila-api index afc7aa60e4..dc212ce7a2 100755 --- a/bin/manila-api +++ b/bin/manila-api @@ -31,8 +31,9 @@ import sys from oslo.config import cfg -possible_topdir = os.path.normpath(os.path.join(os.path.abspath( - sys.argv[0]), os.pardir, os.pardir)) +possible_topdir = os.path.normpath(os.path.join + (os.path.abspath(sys.argv[0]), + os.pardir, os.pardir)) if os.path.exists(os.path.join(possible_topdir, "manila", "__init__.py")): sys.path.insert(0, possible_topdir) @@ -48,7 +49,7 @@ CONF = cfg.CONF if __name__ == '__main__': CONF(sys.argv[1:], project='manila', - version=version.version_string()) + version=version.version_string()) logging.setup("manila") utils.monkey_patch() server = service.WSGIService('osapi_share') diff --git a/bin/manila-manage b/bin/manila-manage index 329e4da11b..0f5e36c0c1 100755 --- a/bin/manila-manage +++ b/bin/manila-manage @@ -58,11 +58,6 @@ from __future__ import print_function import os 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 @@ -82,7 +77,6 @@ from manila.common import config # Need to register global_opts from manila import context from manila import db from manila.db import migration -from manila import exception from manila.openstack.common import log as logging from manila.openstack.common import uuidutils from manila import utils @@ -418,7 +412,7 @@ def main(): try: CONF(sys.argv[1:], project='manila', - version=version.version_string()) + version=version.version_string()) logging.setup("manila") except cfg.ConfigFilesNotFoundError: cfgfile = CONF.config_file[-1] if CONF.config_file else None diff --git a/bin/manila-scheduler b/bin/manila-scheduler index 45575ad4f0..2bc59d6ac8 100755 --- a/bin/manila-scheduler +++ b/bin/manila-scheduler @@ -47,7 +47,7 @@ CONF = cfg.CONF if __name__ == '__main__': CONF(sys.argv[1:], project='manila', - version=version.version_string()) + version=version.version_string()) logging.setup("manila") utils.monkey_patch() server = service.Service.create(binary='manila-scheduler') diff --git a/bin/manila-share b/bin/manila-share index e8b1474ec8..1f06da074d 100755 --- a/bin/manila-share +++ b/bin/manila-share @@ -46,16 +46,15 @@ CONF = cfg.CONF if __name__ == '__main__': args = CONF(sys.argv[1:], project='manila', - version=version.version_string()) + version=version.version_string()) logging.setup("manila") utils.monkey_patch() launcher = service.ProcessLauncher() if CONF.enabled_share_backends: for backend in CONF.enabled_share_backends: host = "%s@%s" % (CONF.host, backend) - server = service.Service.create( - host=host, - service_name=backend) + server = service.Service.create(host=host, + service_name=backend) launcher.launch_server(server) else: server = service.Service.create(binary='manila-share')