diff python/storage.py @ 722:49e99ca34a7d

corrected bugs in old ubc code
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 05 Aug 2015 00:12:52 -0400
parents 2cd245cb780d
children 967d244968a4
line wrap: on
line diff
--- a/python/storage.py	Mon Aug 03 14:48:41 2015 -0400
+++ b/python/storage.py	Wed Aug 05 00:12:52 2015 -0400
@@ -654,11 +654,11 @@
         s = f.readline()
     return s.strip()
 
-def getLines(f, commentCharacters = commentChar):
+def getLines(f, delimiterChar = delimiterChar, commentCharacters = commentChar):
     '''Gets a complete entry (all the lines) in between delimiterChar.'''
     dataStrings = []
     s = readline(f, commentCharacters)
-    while len(s) > 0:
+    while len(s) > 0 and s[0] != delimiterChar:
         dataStrings += [s.strip()]
         s = readline(f, commentCharacters)
     return dataStrings