Commit | Line | Data |
---|---|---|
6f05630b LC |
1 | Wicd 1.7.3 fails to instantiate template lines that have several |
2 | variable references. For instance, the line: | |
3 | ||
4 | wep_key$_KEY_INDEX=$_KEY | |
5 | ||
6 | which is found in in the 'wep-hex' template, expands to these two | |
7 | lines: | |
8 | ||
9 | wep_key0=$_KEY | |
10 | wep_key0=123456789ab | |
11 | ||
12 | This patch fixes that by only emitting the fully substituted line. | |
13 | ||
14 | Patch by Ludovic Courtès <ludo@gnu.org>. | |
15 | ||
16 | --- a/wicd/misc.py 2012-11-17 00:07:08 +0000 | |
17 | +++ b/wicd/misc.py 2015-05-09 11:22:37 +0000 | |
18 | @@ -321,11 +321,11 @@ def ParseEncryption(network): | |
19 | rep_val = '0' | |
20 | if rep_val: | |
21 | line = line.replace("$_%s" % cur_val, str(rep_val)) | |
22 | - config_file = ''.join([config_file, line]) | |
23 | else: | |
24 | print "Ignoring template line: '%s'" % line | |
25 | else: | |
26 | print "Weird parsing error occurred" | |
27 | + config_file = ''.join([config_file, line]) | |
28 | else: # Just a regular entry. | |
29 | config_file = ''.join([config_file, line]) |