Skip to content

Commit

Permalink
End the string when the file has been exhausted
Browse files Browse the repository at this point in the history
  • Loading branch information
gulopine committed Oct 6, 2013
1 parent 911824b commit d8b6927
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions steel/fields/strings.py
Expand Up @@ -19,8 +19,11 @@ def read(self, file):
value = b''
while True:
data = file.read(1)
value += data
if data == self.terminator:
if data:
value += data
if data == self.terminator:
break
else:
break

return value
Expand Down

0 comments on commit d8b6927

Please sign in to comment.