From 768df8dc7c041f78b39764b78a8d8e0bd07a5661 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 13 Jan 2016 11:35:43 +0530 Subject: [PATCH] hide some unused commands, disable install_update --- oml/commands.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/oml/commands.py b/oml/commands.py index 00c676e..9975999 100644 --- a/oml/commands.py +++ b/oml/commands.py @@ -13,6 +13,8 @@ from utils import run, get root_dir = dirname(settings.base_dir) +HIDDEN = ['install_update', 'install_launcher', 'uninstall_launcher'] + def r(*cmd): print(' '.join(cmd)) return subprocess.call(cmd) @@ -73,10 +75,7 @@ def command_install_update(*args): """ Install available updates """ - import update - if not update.install(): - print("UPDATE FAILED") - sys.exit(1) + pass def command_update(*args): """ @@ -267,6 +266,8 @@ def main(): print("usage: ./ctl [action]") indent = max([len(command) for command in commands]) + 4 for command in sorted(commands): + if command in HIDDEN: + continue space = ' ' * (indent - len(command)) info = actions["command_%s"%command].__doc__.split('\n') info = [' %s%s' % (' ' * indent, i.strip()) for i in info]