changeset 420:eb7cbbb00395

better failure on missing bind vars
author catherine@bothari
date Thu, 19 Nov 2009 20:29:08 -0500
parents 8d9e0c5c37a5
children dd9aab264798
files sqlpython/sqlpython.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sqlpython/sqlpython.py	Thu Nov 19 19:58:41 2009 -0500
+++ b/sqlpython/sqlpython.py	Thu Nov 19 20:29:08 2009 -0500
@@ -341,7 +341,7 @@
                     result[varname] = self.binds[varname]
                 except KeyError:
                     if not givenBindVars.has_key(varname):
-                        print 'Bind variable %s not defined.' % (varname)
+                        raise KeyError, 'Bind variable "%s" not defined.' % (varname)
         return result
 
     def default(self, arg):