Update of /cvsroot/monetdb/clients/src/examples/python
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25705/examples/python

Modified Files:
      Tag: Clients_1-20
        sqlsample.py.in 
Log Message:
made query errors available at the upper layers
fixes second part of bug
[ 1814768 ] Python Client problems
(tested by sql/src/test/mapi/Tests/python_dbapi)


Index: sqlsample.py.in
===================================================================
RCS file: /cvsroot/monetdb/clients/src/examples/python/Attic/sqlsample.py.in,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -d -r1.1.2.2 -r1.1.2.3
--- sqlsample.py.in     21 Oct 2007 16:38:04 -0000      1.1.2.2
+++ sqlsample.py.in     21 Oct 2007 20:18:47 -0000      1.1.2.3
@@ -35,8 +35,8 @@
 # deliberately executing a wrong SQL statement:
 try:
        cursor.execute('( xyz 1);')
-except: 
-       print 'error'
+except (RuntimeError), e: 
+       print e
 
 cursor.execute('create table python_table (i smallint,s string);');
 cursor.execute('insert into python_table values ( 3, \'three\');');


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to