From 1b6c4b715293c97dcd7256469aa2287ecfc2e656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Fri, 14 Aug 2009 17:17:47 +0200 Subject: Make overlay a class too --- portato/eix/parser.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'portato/eix') 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") -- cgit v1.2.3