diff --git a/tests/encrypt_secret.py b/tests/encrypt_secret.py index b8524a0fd9..0b0cf19a1d 100644 --- a/tests/encrypt_secret.py +++ b/tests/encrypt_secret.py @@ -30,5 +30,6 @@ def main(): ciphertext = encryption.encrypt_pkcs1_oaep(sys.argv[1], public_key) print(ciphertext.encode('base64')) + if __name__ == '__main__': main() diff --git a/tools/trigger-job.py b/tools/trigger-job.py index 7123afce86..dd69f1b1fe 100755 --- a/tools/trigger-job.py +++ b/tools/trigger-job.py @@ -73,5 +73,6 @@ def main(): while not job.complete: time.sleep(1) + if __name__ == '__main__': main() diff --git a/tools/update-storyboard.py b/tools/update-storyboard.py index 12e6916b95..51434c9c11 100644 --- a/tools/update-storyboard.py +++ b/tools/update-storyboard.py @@ -96,5 +96,6 @@ def main(): if ok_lanes and not task_found: add_task(sync, task, lanes[ok_lanes[0]]) + if __name__ == '__main__': main() diff --git a/tox.ini b/tox.ini index 6a50c6dd19..9b97eca62b 100644 --- a/tox.ini +++ b/tox.ini @@ -51,6 +51,6 @@ commands = python setup.py test --slowest --testr-args='--concurrency=1 {posargs [flake8] # These are ignored intentionally in openstack-infra projects; # please don't submit patches that solely correct them or enable them. -ignore = E305,E125,E129,E402,H,W503 +ignore = E125,E129,E402,H,W503 show-source = True exclude = .venv,.tox,dist,doc,build,*.egg diff --git a/zuul/driver/sql/alembic_reporter/env.py b/zuul/driver/sql/alembic_reporter/env.py index 56a5b7e997..4542a22270 100644 --- a/zuul/driver/sql/alembic_reporter/env.py +++ b/zuul/driver/sql/alembic_reporter/env.py @@ -64,6 +64,7 @@ def run_migrations_online(): with context.begin_transaction(): context.run_migrations() + if context.is_offline_mode(): run_migrations_offline() else: