changeset 7:68d2384b0a52

switch to command parser
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 10 Jul 2012 14:24:25 -0700
parents 82aad57c7d1d
children 20c42ae0f7b7
files talosnames/main.py
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/talosnames/main.py	Tue Jul 10 14:04:34 2012 -0700
+++ b/talosnames/main.py	Tue Jul 10 14:24:25 2012 -0700
@@ -7,8 +7,17 @@
 import api
 import sys
 import optparse
+from commandparser import CommandParser
 from pprint import pprint
 
+class TalosNamesCLI(CommandParser):
+    def __init__(self):
+        self.api = api.TalosNames()
+
+    def graphserver(self, *names):
+        if not names:
+            pass
+
 def main(args=sys.argv[1:]):
 
     # parse command line options
@@ -34,5 +43,7 @@
         print
 
 if __name__ == '__main__':
-  main()
 
+    parser = CommandParser(TalosNamesCLI)
+    parser.invoke(sys.argv[1:])
+