From 82eaef2a4af0b31a91c452c277a1f8bdfbee1086 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Mon, 5 Mar 2012 21:32:44 -0800 Subject: [PATCH] Added args check --- tools/list_pkgs.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/list_pkgs.py b/tools/list_pkgs.py index 3323aba8..19a53459 100644 --- a/tools/list_pkgs.py +++ b/tools/list_pkgs.py @@ -25,10 +25,13 @@ def get_pips(c, distro): if __name__ == "__main__": - ME = os.path.basename(sys.argv[0]) + me = os.path.basename(sys.argv[0]) + if len(sys.argv) < 2: + print("%s distro" % (me)) + sys.exit(1) distro = sys.argv[1] for c in sorted(settings.COMPONENT_NAMES): - print("Packages for %s:" % (utils.color_text(c, 'green'))) + print("Packages for %s:" % (utils.color_text(c, 'green', bold=True, underline=True))) pips = get_pips(c, distro) if pips is None or not pips: print("\t- %s" % (utils.color_text('N/A', 'red')))