[Liblas-commits] hg: typo

liblas-commits at liblas.org liblas-commits at liblas.org
Mon May 16 15:25:26 EDT 2011


details:   http://hg.liblas.orghg/rev/7c06b40da6d0
changeset: 2942:7c06b40da6d0
user:      Michael P. Gerlek <mpg at flaxen.com>
date:      Mon May 16 12:25:10 2011 -0700
description:
typo
Subject: hg: merge

details:   http://hg.liblas.orghg/rev/993d198e47e0
changeset: 2943:993d198e47e0
user:      Michael P. Gerlek <mpg at flaxen.com>
date:      Mon May 16 12:25:23 2011 -0700
description:
merge

diffstat:

 python/liblas/file.py   |  3 +++
 python/tests/File.txt   |  5 +++++
 src/detail/zippoint.cpp |  2 +-
 3 files changed, 9 insertions(+), 1 deletions(-)

diffs (38 lines):

diff -r 5ed84f7d6e69 -r 993d198e47e0 python/liblas/file.py
--- a/python/liblas/file.py	Wed May 11 11:45:20 2011 -0700
+++ b/python/liblas/file.py	Mon May 16 12:25:23 2011 -0700
@@ -131,6 +131,9 @@
         """
         
         if self._mode == 'r' or self._mode == 'rb':
+            
+            if not os.path.exists(self.filename):
+                raise OSError("No such file or directory: '%s'" % self.filename)
 
             if self._header == None:
                 self.handle = core.las.LASReader_Create(self.filename)
diff -r 5ed84f7d6e69 -r 993d198e47e0 python/tests/File.txt
--- a/python/tests/File.txt	Wed May 11 11:45:20 2011 -0700
+++ b/python/tests/File.txt	Mon May 16 12:25:23 2011 -0700
@@ -1,4 +1,9 @@
   >>> from liblas import file
+  >>> file.File('notafile.las') #doctest: +IGNORE_EXCEPTION_DETAIL
+  Traceback (most recent call last):
+  ...
+  OSError: missing file
+  
   >>> f = file.File('../test/data/TO_core_last_clip.las')
   
   >>> f.header # doctest: +ELLIPSIS
diff -r 5ed84f7d6e69 -r 993d198e47e0 src/detail/zippoint.cpp
--- a/src/detail/zippoint.cpp	Wed May 11 11:45:20 2011 -0700
+++ b/src/detail/zippoint.cpp	Mon May 16 12:25:23 2011 -0700
@@ -127,7 +127,7 @@
         m_num_items = 2;
         m_items = new LASitem[2];
         m_items[0].type = LASitem::POINT10;
-        m_items[0].size = 8;
+        m_items[0].size = 20;
         m_items[1].type = LASitem::GPSTIME11;
         m_items[1].size = 8;
         break;


More information about the Liblas-commits mailing list