From bd9a6ba8adfd633c38ca43f76ddc06f60fc0964b Mon Sep 17 00:00:00 2001 From: lxnay Date: Sun, 8 Feb 2009 14:37:55 +0000 Subject: [PATCH] Molecule: fix prechroot parsing git-svn-id: http://svn.sabayonlinux.org/projects/molecule/trunk@2997 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- molecule.py | 1 + molecule/settings.py | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/molecule.py b/molecule.py index 12ada48..e9dd712 100644 --- a/molecule.py +++ b/molecule.py @@ -20,6 +20,7 @@ import sys sys.path.insert(0,'/usr/lib/molecule/') sys.path.insert(0,'molecule/') +sys.path.insert(0,'.') import molecule.cmdline from molecule.handlers import Runner diff --git a/molecule/settings.py b/molecule/settings.py index 294bf0b..51fe77c 100644 --- a/molecule/settings.py +++ b/molecule/settings.py @@ -142,6 +142,12 @@ class SpecParser: molecule.utils.is_exec_available(x) return x + def valid_exec_first_list_item(x): + if not x: return False + myx = x[0] + molecule.utils.is_exec_available(myx) + return True + def valid_ascii(x): try: x = str(x) @@ -167,7 +173,7 @@ class SpecParser: ] self.parser_data_path = { 'prechroot': { - 'cb': valid_exec, + 'cb': valid_exec_first_list_item, 've': ve_string_splitter, }, 'release_string': {