ooo-build r14239 - in trunk: . scratch/sc-xlsutil/src



Author: kyoshida
Date: Wed Oct  8 02:09:09 2008
New Revision: 14239
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14239&view=rev

Log:
2008-10-07  Kohei Yoshida  <kyoshida novell com>

	* scratch/sc-xlsutil/src/stream.py (readByteArray): raise EndOfStream 
	exception when running out of stream bytes.


Modified:
   trunk/ChangeLog
   trunk/scratch/sc-xlsutil/src/stream.py

Modified: trunk/scratch/sc-xlsutil/src/stream.py
==============================================================================
--- trunk/scratch/sc-xlsutil/src/stream.py	(original)
+++ trunk/scratch/sc-xlsutil/src/stream.py	Wed Oct  8 02:09:09 2008
@@ -363,6 +363,8 @@
     def readByteArray (self, size=1):
         bytes = []
         for i in xrange(0, size):
+            if self.pos >= self.size:
+                raise EndOfStream
             bytes.append(ord(self.bytes[self.pos]))
             self.pos += 1
         return bytes



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]