Drop is_active_profile()

... and inline it at the only place that uses it
This commit is contained in:
Christian Boltz 2020-05-10 23:49:16 +02:00
parent 13bea6f4a7
commit 710d5ae466
Failed to generate hash of commit

View file

@ -1476,7 +1476,7 @@ def do_logprof_pass(logmark=''):
def save_profiles():
# Ensure the changed profiles are actual active profiles
for prof_name in changed.keys():
if not is_active_profile(prof_name):
if not aa.get(prof_name, False):
print("*** save_profiles(): removing %s" % prof_name)
print('*** This should not happen. Please open a bugreport!')
changed.pop(prof_name)
@ -2151,12 +2151,6 @@ def separate_vars(vs):
return data
def is_active_profile(pname):
if aa.get(pname, False):
return True
else:
return False
def store_list_var(var, list_var, value, var_operation, filename):
"""Store(add new variable or add values to variable) the variables encountered in the given list_var
- the 'var' parameter will be modified