summaryrefslogtreecommitdiff
path: root/portato/eix
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-08-14 17:17:47 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-08-14 17:17:47 +0200
commit1b6c4b715293c97dcd7256469aa2287ecfc2e656 (patch)
tree027a088411ca07e0d17451c4f23b8b72587cb50b /portato/eix
parent2da9ef4570c72d4b67121890447ac37cc5cc3749 (diff)
downloadportato-1b6c4b715293c97dcd7256469aa2287ecfc2e656.tar.gz
portato-1b6c4b715293c97dcd7256469aa2287ecfc2e656.tar.bz2
portato-1b6c4b715293c97dcd7256469aa2287ecfc2e656.zip
Make overlay a class too
Diffstat (limited to '')
-rw-r--r--portato/eix/parser.py14
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")