changeset 93:f40bb62c625f

one cmd line arg works
author catherine@cordelia
date Sun, 25 May 2008 01:39:25 -0400
parents fa8c9eb8908f
children 5df8e2477ca3
files mysqlpy.py
diffstat 1 files changed, 3 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/mysqlpy.py	Sun May 25 01:35:08 2008 -0400
+++ b/mysqlpy.py	Sun May 25 01:39:25 2008 -0400
@@ -167,22 +167,11 @@
         if sys.argv[1][0] != '@':
             my.do_connect(sys.argv.pop(1))
         arg = ' '.join(sys.argv[1:])
-        my.onecmd(arg)
-        '''
-        if arg:
-            tmp = tempfile.TemporaryFile()
-            tmp.write(arg)
-            tmp.seek(0)
-            if my.do__load(tmp) == mysqlpy._STOP_AND_EXIT:
-                return
-                '''
+        if my.onecmd(arg):
+            return
     except IndexError:
         pass
     my.cmdloop()
 
 if __name__ == '__main__':
-    try:
-        run()
-    except cmd2.ExitException:
-        pass
-        
+    run()