Update pbr usage to modern understandings

Explicitly, d2to1 is the devil. Updated pep8 issues.

Change-Id: I35307f820a98244f5a9ae32ce01f18ce7b434c19
This commit is contained in:
Monty Taylor 2013-09-14 10:16:51 -05:00
parent 903748e7ac
commit 8095ea24ad
6 changed files with 13 additions and 18 deletions

View File

@ -36,7 +36,7 @@ class ExpungeScheduler(object):
if self.args.server_id != day % self.args.number_of_servers:
self.logger.info('Not our turn to run expunge check, sleeping')
self.expunge_timer = threading.Timer(
24*60*60, self.run_expunge, ()
24 * 60 * 60, self.run_expunge, ()
)
with db_session() as session:
try:
@ -59,4 +59,5 @@ class ExpungeScheduler(object):
except:
self.logger.exception('Exception occurred during expunge')
self.logger.info('Expunge thread sleeping for 24 hours')
self.expunge_timer = threading.Timer(24*60*60, self.run_expunge, ())
self.expunge_timer = threading.Timer(
24 * 60 * 60, self.run_expunge, ())

View File

@ -110,7 +110,7 @@ def wsexpose(*args, **kwargs):
except (OperationalError, ResourceClosedError):
logger = logging.getLogger(__name__)
logger.warning(
"Galera deadlock, retry {0}".format(x+1)
"Galera deadlock, retry {0}".format(x + 1)
)
args = old_args
kwargs = old_kwargs

View File

@ -70,7 +70,7 @@ def client_job(logger, job_type, host, data, lbid):
except OperationalError:
# Auto retry on galera locking error
logger.warning(
"Galera deadlock in gearman, retry {0}".format(x+1)
"Galera deadlock in gearman, retry {0}".format(x + 1)
)
except:
logger.exception("Gearman thread unhandled exception")

View File

@ -1,8 +1,3 @@
[build_sphinx]
all_files = 1
build-dir = build/sphinx
source-dir = doc
[metadata]
name = libra
author = David Shrewsbury <shrewsbury.dave@gmail.com>, Andrew Hutchings <andrew@linuxjedi.co.uk>
@ -23,13 +18,14 @@ classifier =
packages =
libra
[global]
setup-hooks =
pbr.hooks.setup_hook
[entry_points]
console_scripts =
libra_worker = libra.worker.main:main
libra_pool_mgm = libra.mgm.mgm:main
libra_api = libra.api.app:main
libra_admin_api = libra.admin_api.app:main
[build_sphinx]
all_files = 1
build-dir = build/sphinx
source-dir = doc

View File

@ -1,5 +1,6 @@
hacking>=0.5.6,<0.8
fixtures>=0.3.12
flake8
mock
python-subunit
sphinx>=1.1.2

View File

@ -13,11 +13,8 @@ downloadcache = ~/cache/pip
deps = flake8
commands = flake8
[testenv:pyflakes]
deps = pyflakes
commands = pyflakes libra
[flake8]
ignore = H
show-source = True
exclude = .venv,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tests,build