import sys
# Add lib to path
-sys.path.insert(0,os.path.abspath(os.path.join(__file__,'../..')))
+sys.path.insert(0,os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import wizard.command
def main():
massmigrate Performs mass migration of autoinstalls of an application
migrate Migrate autoinstalls from old format to Git-based format
summary Generate statistics about autoinstalls
+ upgrade Upgrades an autoinstall to the latest version
See '%prog help COMMAND' for more information on a specific command."""
# Find the end of the "global" options
options, args = parser.parse_args()
rest_argv = args[1:]
- command = args[0] # shouldn't fail
+ try:
+ command = args[0]
+ except IndexError:
+ parser.print_help()
+ raise SystemExit(-1)
if command == "help":
try:
getattr(wizard.command, rest_argv[0]).main(['-h'], options)