diff options
author | Frederic Lepied <flepied@mandriva.com> | 2002-07-28 20:53:24 +0000 |
---|---|---|
committer | Frederic Lepied <flepied@mandriva.com> | 2002-07-28 20:53:24 +0000 |
commit | 16b8c62af8f476b5bf970a33db1965dc04f2c112 (patch) | |
tree | 5b62800d5a3e7e141506c260d2b368e16a638701 | |
parent | 13cacb0d02a62d1d73804796f86818eaf9413c06 (diff) | |
download | msec-16b8c62af8f476b5bf970a33db1965dc04f2c112.tar msec-16b8c62af8f476b5bf970a33db1965dc04f2c112.tar.gz msec-16b8c62af8f476b5bf970a33db1965dc04f2c112.tar.bz2 msec-16b8c62af8f476b5bf970a33db1965dc04f2c112.tar.xz msec-16b8c62af8f476b5bf970a33db1965dc04f2c112.zip |
(set_zero_one_variable): corrected bug when the variable doesn't exist before
setting it.
-rw-r--r-- | share/libmsec.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/share/libmsec.py b/share/libmsec.py index eac4831..b947235 100644 --- a/share/libmsec.py +++ b/share/libmsec.py @@ -690,7 +690,9 @@ def set_zero_one_variable(file, variable, value, secure_value, one_msg, zero_msg f = ConfigFile.get_config_file(file) if f.exists(): - val = int(f.get_shell_variable(variable)) + val = f.get_shell_variable(variable) + if val: + val = int(val) else: val = None |