diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2009-08-14 17:17:47 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2009-08-14 17:17:47 +0200 |
commit | 1b6c4b715293c97dcd7256469aa2287ecfc2e656 (patch) | |
tree | 027a088411ca07e0d17451c4f23b8b72587cb50b /portato/eix | |
parent | 2da9ef4570c72d4b67121890447ac37cc5cc3749 (diff) | |
download | portato-1b6c4b715293c97dcd7256469aa2287ecfc2e656.tar.gz portato-1b6c4b715293c97dcd7256469aa2287ecfc2e656.tar.bz2 portato-1b6c4b715293c97dcd7256469aa2287ecfc2e656.zip |
Make overlay a class too
Diffstat (limited to '')
-rw-r--r-- | portato/eix/parser.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/portato/eix/parser.py b/portato/eix/parser.py index 20e1e06..d5265fa 100644 --- a/portato/eix/parser.py +++ b/portato/eix/parser.py @@ -92,13 +92,6 @@ def string (file, skip = False): return s -def overlay (file, skip = False): - if skip: - string(file, skip = True) # path - string(file, skip = True) # label - else: - return (string(file), string(file)) - class LazyElement (object): __slots__ = ("file", "get_type", "_value", "pos") @@ -123,6 +116,13 @@ class LazyElement (object): def __call__ (self): return self.value +class overlay (object): + __slots__ = ("path", "label") + + def __init__ (file, skip = False): + self.path = LazyElement(string, file) + self.label = LazyElement(string, label) + class header (object): __slots__ = ("version", "ncats", "overlays", "provide", "licenses", "keywords", "useflags", "slots", "sets") |