No __name__ test in the db migration script

Bug #1290708 reported by Gauvain Pocentek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Low
Gauvain Pocentek

Bug Description

trove/db/sqlalchemy/migrate_repo/manage.py doesn't implement the usual __name__ == "__main__ " test before executing main().

This breaks the openstack-doc-tools script used to discover the configuration options (every .py file is imported by this script).

Changed in trove:
assignee: nobody → Gauvain Pocentek (gpocentek)
status: New → In Progress
Changed in trove:
importance: Undecided → Low
milestone: none → icehouse-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/79176
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=a8abde067e8a79e4d6ff5b0012724fe1adcab7b8
Submitter: Jenkins
Branch: master

commit a8abde067e8a79e4d6ff5b0012724fe1adcab7b8
Author: Gauvain Pocentek <email address hidden>
Date: Sun Mar 9 08:31:11 2014 +0100

    Don't run main() on import

    This patch adds the usual __name__ test to the database migration script to
    avoid execution of the main() function in case of a module import (which
    happens when running the configuration options discovery script from
    openstack-doc-tools).

    Closes-Bug: #1290708
    Change-Id: I863a36bcbbbbb02652a4aae8ec1f383c43b5bc56

Changed in trove:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in trove:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in trove:
milestone: icehouse-rc1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.