changeset 461:c27cab20ec4a

don't die when no connect arg
author cat@eee
date Wed, 24 Feb 2010 12:17:52 -0500
parents 455b66f15be4
children c6394c335e45
files sqlpython/sqlpyPlus.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sqlpython/sqlpyPlus.py	Sat Feb 20 00:11:55 2010 -0500
+++ b/sqlpython/sqlpyPlus.py	Wed Feb 24 12:17:52 2010 -0500
@@ -1668,7 +1668,7 @@
 
     def cmdloop(self):
         # TODO: args past ; don't even get into sys.argv
-        if sys.argv[1] in ('--test', '-t'):
+        if (len(sys.argv) > 1) and sys.argv[1] in ('--test', '-t'):
             self.runTranscriptTests(sys.argv[2:])
         else:
             self.run_commands_at_invocation(sys.argv[1:])