Ability to run cmd scripts directly.

Add a conditional check to call main() in cmd scripts if they're
being invoked directly. Some already had them, but most simply
relied on the entrypoints wrappers declared in setup.py. With this
change, users can more easily test and debug the various command
scripts directly without needing setup magic.

Change-Id: I16c26e954687de8af5f971936fb8eee2072c06bc
Reviewed-on: https://review.openstack.org/26966
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
Jeremy Stanley
2013-04-15 20:18:16 +00:00
committed by Jenkins
parent c8cc7a5091
commit 06efb06f84
8 changed files with 24 additions and 0 deletions

View File

@@ -89,3 +89,6 @@ def main():
# Process impacts found in git log
if impacted(git_log, args.impact):
process_impact(git_log, args)
if __name__ == "__main__":
main()