Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Discard white-space before record start

  • Loading branch information...
commit d3732aacb084f0e7f678e774b59d368a1d4f9255 1 parent 5c98206
@erijo authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 svndump/dumpfile.py
View
12 svndump/dumpfile.py
@@ -44,7 +44,17 @@ def __next__(self):
if self.record is not None:
self.record.discard()
- self.record = Record.read(self)
+ try:
+ while True:
+ data = self._buffer.peek(1)
+ if len(data) == 0 or not data[0].decode(self._codec).isspace():
+ break
+ self.offset += len(self._buffer.read(1))
+
+ self.record = Record.read(self)
+ except UnicodeDecodeError as e:
+ self.error(str(e))
+
if self.record is None:
if len(self.read(1)) == 0:
raise StopIteration
Please sign in to comment.
Something went wrong with that request. Please try again.