Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Make it possible to access header with index in addtion to name

  • Loading branch information...
commit 5c9820646c9c98c32858cc84d08cee51097e3289 1 parent 0bcccb6
Erik Johansson authored

Showing 2 changed files with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  svndump/record.py
  2. +4 0 svndump/section.py
2  svndump/record.py
@@ -26,7 +26,7 @@ def read(stream):
26 26 elif UuidRecord.UUID_HEADER in headers:
27 27 return UuidRecord.read(headers, stream)
28 28
29   - stream.error("unknown record");
  29 + stream.error("unknown record %s" % headers[0].key);
30 30
31 31 class VersionStampRecord(Record):
32 32 VERSION_HEADER = "SVN-fs-dump-format-version"
4 svndump/section.py
@@ -52,6 +52,10 @@ def __getitem__(self, key):
52 52 for header in self.headers:
53 53 if header.key == key:
54 54 return header.value
  55 + try:
  56 + return self.headers[key]
  57 + except TypeError:
  58 + pass
55 59 raise KeyError(key)
56 60
57 61 def __setitem__(self, key, value):

0 comments on commit 5c98206

Please sign in to comment.
Something went wrong with that request. Please try again.