mirror of
https://github.com/gryf/wicd.git
synced 2025-12-22 14:07:59 +01:00
wicd: Fix the parsing and writing of wep-hex configurations (launchpad bug #1419464)
Thanks, Axel Beckert from Debian! *** Symptom: Can't connect to WEP based networks with hexadecimal keys due to unexpanded template variables like $_KEY in the actual wpa_supplicant configurations. Solution: Move the appending of the line outside the loop over all matches in one line. Author: Axel Beckert <abe@debian.org> Bug-Debian: https://bugs.debian.org/812427 Bug: https://bugs.launchpad.net/wicd/+bug/1419464
This commit is contained in:
@@ -321,11 +321,11 @@ def ParseEncryption(network):
|
|||||||
rep_val = '0'
|
rep_val = '0'
|
||||||
if rep_val:
|
if rep_val:
|
||||||
line = line.replace("$_%s" % cur_val, str(rep_val))
|
line = line.replace("$_%s" % cur_val, str(rep_val))
|
||||||
config_file = ''.join([config_file, line])
|
|
||||||
else:
|
else:
|
||||||
print "Ignoring template line: '%s'" % line
|
print "Ignoring template line: '%s'" % line
|
||||||
else:
|
else:
|
||||||
print "Weird parsing error occurred"
|
print "Weird parsing error occurred"
|
||||||
|
config_file = ''.join([config_file, line])
|
||||||
else: # Just a regular entry.
|
else: # Just a regular entry.
|
||||||
config_file = ''.join([config_file, line])
|
config_file = ''.join([config_file, line])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user