diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-12-08 15:37:24 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-12-23 16:27:56 +0100 |
commit | ac3dbaebc8084886a1f7aedb07db203d472d763a (patch) | |
tree | 269f82b3b897779578ea03dc135e518f068dd105 /pxeboot.check | |
parent | 7dbac5c2f7b9e5d0ca04d4f5f4dc101f0ef0272e (diff) | |
download | definitions-ac3dbaebc8084886a1f7aedb07db203d472d763a.tar.gz |
pxeboot.check: Fix a couple of syntax errors in the code
Diffstat (limited to 'pxeboot.check')
-rwxr-xr-x | pxeboot.check | 5 |
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 |