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-19 10:37:32 +0000
commit22c23ac590c67e1ff85bb5563d670cef30ce2e57 (patch)
tree9d0dfdbb66b91ea6d85e49aac1748c87eb975777
parent6cd8d0158bbfc4694e887b033bcb6a4693a520e3 (diff)
downloaddefinitions-22c23ac590c67e1ff85bb5563d670cef30ce2e57.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