Skip to content
Browse files

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

  • Loading branch information...
1 parent 0bcccb6 commit 5c9820646c9c98c32858cc84d08cee51097e3289 @erijo committed Apr 26, 2012
Showing with 5 additions and 1 deletion.
  1. +1 −1 svndump/record.py
  2. +4 −0 svndump/section.py
View
2 svndump/record.py
@@ -26,7 +26,7 @@ def read(stream):
elif UuidRecord.UUID_HEADER in headers:
return UuidRecord.read(headers, stream)
- stream.error("unknown record");
+ stream.error("unknown record %s" % headers[0].key);
class VersionStampRecord(Record):
VERSION_HEADER = "SVN-fs-dump-format-version"
View
4 svndump/section.py
@@ -52,6 +52,10 @@ def __getitem__(self, key):
for header in self.headers:
if header.key == key:
return header.value
+ try:
+ return self.headers[key]
+ except TypeError:
+ pass
raise KeyError(key)
def __setitem__(self, key, value):

0 comments on commit 5c98206

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