pep8 checking was added for bin folder
Change-Id: I9b3a8928fb1d0e9c00361e90dcdcd2eb09e8e44b Closes-Bug: #1218364
This commit is contained in:
parent
2538755e9b
commit
fb3c01bd38
@ -28,8 +28,8 @@ gettext.install('trove', unicode=1)
|
||||
# If ../trove/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
os.pardir,
|
||||
os.pardir))
|
||||
os.pardir,
|
||||
os.pardir))
|
||||
if os.path.exists(os.path.join(possible_topdir, 'trove', '__init__.py')):
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
|
@ -27,7 +27,7 @@ import sys
|
||||
|
||||
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(
|
||||
sys.argv[0]), os.pardir, os.pardir))
|
||||
sys.argv[0]), os.pardir, os.pardir))
|
||||
if os.path.exists(os.path.join(possible_topdir, "nova", "__init__.py")):
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
@ -47,14 +47,12 @@ trove_opts = [
|
||||
# port magic in service.WSGIService the name of the app has to be the same
|
||||
# as the name of the service
|
||||
cfg.IntOpt('%s_listen_port' % SERVICE_NAME,
|
||||
default=8779,
|
||||
help='Trove API default port'),
|
||||
default=8779,
|
||||
help='Trove API default port'),
|
||||
cfg.MultiStrOpt('trove_api_extension',
|
||||
default=[
|
||||
'trove.api.database.contrib.standard_extensions'
|
||||
],
|
||||
help='osapi compute extension to load'),
|
||||
]
|
||||
default=['trove.api.database.contrib.standard_extensions'],
|
||||
help='osapi compute extension to load'), ]
|
||||
|
||||
FLAGS = flags.FLAGS
|
||||
FLAGS.register_opts(trove_opts)
|
||||
|
||||
|
@ -288,7 +288,7 @@ def main():
|
||||
print "Possible wrong number of arguments supplied."
|
||||
print "%s %s: %s" % (cmd, action, fn.__doc__)
|
||||
print "\t\t", [fn.func_code.co_varnames[i] for i in
|
||||
range(fn.func_code.co_argcount)]
|
||||
range(fn.func_code.co_argcount)]
|
||||
print "ERROR: %s" % err
|
||||
except Exception:
|
||||
print "Command failed, please check the log for more info."
|
||||
|
@ -31,8 +31,8 @@ gettext.install('trove', unicode=1)
|
||||
# If ../trove/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
os.pardir,
|
||||
os.pardir))
|
||||
os.pardir,
|
||||
os.pardir))
|
||||
if os.path.exists(os.path.join(possible_topdir, 'trove', '__init__.py')):
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
|
@ -29,8 +29,8 @@ gettext.install('trove', unicode=1)
|
||||
# If ../trove/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
os.pardir,
|
||||
os.pardir))
|
||||
os.pardir,
|
||||
os.pardir))
|
||||
if os.path.exists(os.path.join(possible_topdir, 'trove', '__init__.py')):
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
@ -72,7 +72,7 @@ class Commands(object):
|
||||
def image_update(self, service_name, image_id):
|
||||
self.db_api.configure_db(CONF)
|
||||
image = self.db_api.find_by(instance_models.ServiceImage,
|
||||
service_name=service_name)
|
||||
service_name=service_name)
|
||||
if image is None:
|
||||
# Create a new one
|
||||
image = instance_models.ServiceImage()
|
||||
@ -121,7 +121,7 @@ if __name__ == '__main__':
|
||||
|
||||
try:
|
||||
logging.setup(None)
|
||||
|
||||
|
||||
Commands().execute()
|
||||
sys.exit(0)
|
||||
except TypeError as e:
|
||||
|
@ -31,8 +31,8 @@ gettext.install('trove', unicode=1)
|
||||
# If ../trove/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
os.pardir,
|
||||
os.pardir))
|
||||
os.pardir,
|
||||
os.pardir))
|
||||
if os.path.exists(os.path.join(possible_topdir, 'trove', '__init__.py')):
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
|
@ -28,8 +28,8 @@ gettext.install('trove', unicode=1)
|
||||
# If ../trove/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
os.pardir,
|
||||
os.pardir))
|
||||
os.pardir,
|
||||
os.pardir))
|
||||
if os.path.exists(os.path.join(possible_topdir, 'trove', '__init__.py')):
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
@ -41,13 +41,13 @@ from trove.db import get_db_api
|
||||
|
||||
extra_opts = [
|
||||
openstack_cfg.BoolOpt('fork',
|
||||
short='f',
|
||||
default=False,
|
||||
dest='fork'),
|
||||
short='f',
|
||||
default=False,
|
||||
dest='fork'),
|
||||
openstack_cfg.StrOpt('pid-file',
|
||||
default='.pid'),
|
||||
default='.pid'),
|
||||
openstack_cfg.StrOpt('override-logfile',
|
||||
default=None),
|
||||
default=None),
|
||||
]
|
||||
|
||||
CONF = cfg.CONF
|
||||
@ -61,8 +61,6 @@ def run_server():
|
||||
launcher = wsgi.launch('trove', CONF.bind_port or 8779, conf_file,
|
||||
workers=CONF.trove_api_workers)
|
||||
|
||||
|
||||
|
||||
launcher.wait()
|
||||
except RuntimeError as error:
|
||||
import traceback
|
||||
@ -89,4 +87,3 @@ if __name__ == '__main__':
|
||||
f.write(str(pid))
|
||||
else:
|
||||
run_server()
|
||||
|
||||
|
@ -31,8 +31,8 @@ gettext.install('trove', unicode=1)
|
||||
# If ../trove/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
os.pardir,
|
||||
os.pardir))
|
||||
os.pardir,
|
||||
os.pardir))
|
||||
if os.path.exists(os.path.join(possible_topdir, 'trove', '__init__.py')):
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
|
3
tox.ini
3
tox.ini
@ -35,4 +35,5 @@ commands = {posargs}
|
||||
show-source = True
|
||||
ignore = E125,F401,F403,F811,F821,F841,H102,H103,H201,H23,H301,H306,H401,H402,H403,H404,H702,H703
|
||||
builtins = _
|
||||
exclude=.venv,.tox,dist,doc,openstack,*egg,rsdns,tools
|
||||
exclude=.venv,.tox,dist,doc,openstack,*egg,rsdns,tools,etc
|
||||
filename=*.py,trove-*
|
Loading…
Reference in New Issue
Block a user