diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2009-08-14 15:54:22 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2009-08-14 15:54:22 +0200 |
commit | 0e6702e069aeabcd995b8968d0ebbc1593d59bf6 (patch) | |
tree | c41cd3af8bdb1a3bc0b20d95d7cf9c55934a5ab2 /portato/eix/__init__.py | |
parent | 1e88fe3bee51cd04928499f8ec29e00cf129ad33 (diff) | |
download | portato-0e6702e069aeabcd995b8968d0ebbc1593d59bf6.tar.gz portato-0e6702e069aeabcd995b8968d0ebbc1593d59bf6.tar.bz2 portato-0e6702e069aeabcd995b8968d0ebbc1593d59bf6.zip |
Add header-object
Diffstat (limited to '')
-rw-r--r-- | portato/eix/__init__.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/portato/eix/__init__.py b/portato/eix/__init__.py index 3c1958e..6768ca7 100644 --- a/portato/eix/__init__.py +++ b/portato/eix/__init__.py @@ -18,7 +18,7 @@ from . import exceptions as ex from ..helper import debug class EixReader(object): - supported_version = (28,) + supported_versions = (28,) def __init__ (self, filename): self.filename = filename @@ -31,10 +31,15 @@ class EixReader(object): raise ex.UnsupportedVersionError(self.version) debug("Started EixReader for version %s.", self.version) + + self.file.seek(0) except: self.close() raise + def header (self): + return parser.header(self.file) + def close (self): self.file.close() debug("EixReader closed.") |