[Liblas-commits] hg: don't use fetchall

liblas-commits at liblas.org liblas-commits at liblas.org
Tue Oct 27 07:52:47 EDT 2009


changeset 71f65eb30834 in /home/www/liblas.org/hg
details: http://hg.liblas.org/main/hg?cmd=changeset;node=71f65eb30834
summary: don't use fetchall

diffstat:

 python/scripts/oci2las.py |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r f21138c20a3a -r 71f65eb30834 python/scripts/oci2las.py
--- a/python/scripts/oci2las.py	Mon Oct 26 12:26:56 2009 -0500
+++ b/python/scripts/oci2las.py	Tue Oct 27 06:49:32 2009 -0500
@@ -211,6 +211,7 @@
     
     def get_srid(self, srid):
         cur = self.con.cursor()
+        if not srid: return ''
         cur.execute('SELECT WKTEXT,WKTEXT3D from MDSYS.CS_SRS where srid=%d'%(int(srid)))
         res = cur.fetchall()
         for wkt in res:
@@ -231,9 +232,10 @@
         self.cur.execute(self.options.sql)
         clouds = []
 
-        res = self.cur.fetchall()
+        res = [] #self.cur.fetchall()
 
-        for row in res:
+        for row in self.cur:
+            res.append(row)
             for column in row:
                 try:
                     column.BASE_TABLE_COL
@@ -274,7 +276,6 @@
                         try:
                             col.SDO_SRID
                             self.srs = self.get_srid(col.SDO_SRID)
-                            import pdb;pdb.set_trace()
                             break
                         except AttributeError:
                             continue


More information about the Liblas-commits mailing list