summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-12-08 15:37:24 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-12-16 17:56:09 +0000
commitfeabf61d42f1b6cb0bf4de0f5cf4410ff691812f (patch)
treec75ba37412d3b858cf5270354aed67c3051c1840
parent9e5449c233336199c4ee51c4bfd9612961f96016 (diff)
downloaddefinitions-feabf61d42f1b6cb0bf4de0f5cf4410ff691812f.tar.gz
pxeboot.check: Fix a couple of syntax errors in the code
-rwxr-xr-xpxeboot.check5
1 files changed, 3 insertions, 2 deletions
diff --git a/pxeboot.check b/pxeboot.check
index d7eb9b5c..97b87d22 100755
--- a/pxeboot.check
+++ b/pxeboot.check
@@ -18,7 +18,7 @@ valid_option_sets = frozenset((
('existing-server', frozenset(('PXEBOOT_CONFIG_TFTP_ADDRESS',
'PXEBOOT_ROOTFS_RSYNC_ADDRESS'))),
))
-valid_modes = frozenset(mode for (mode, opt_set in valid_option_sets))
+valid_modes = frozenset(mode for mode, opt_set in valid_option_sets)
def compute_matches(env):
@@ -27,6 +27,7 @@ def compute_matches(env):
if all(k in env for k in opt_set):
complete_matches.add(opt_set)
return complete_matches
+
complete_matches = compute_matches(os.environ)
def word_separate_options(options):
@@ -39,7 +40,7 @@ def word_separate_options(options):
valid_options = frozenset(flatten(opt_set for (mode, opt_set)
in valid_option_sets))
-matched_options = frozenset(o for o in valid_options)
+matched_options = frozenset(o for o in valid_options
if o in os.environ)
if not complete_matches:
addable_sets = frozenset(frozenset(os) - matched_options for os in