mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-04 08:15:21 +00:00
drop unused 'finishing' in do_logprof_pass()
finishing was always false, resulting in always returning 'NORMAL'. Remove the variable, remove the unused condition - and change the only place (aa-genprof) that expected a return value from do_logprof_pass() to not expect it anymore. found by Coverity, CID 198637
This commit is contained in:
@@ -160,10 +160,8 @@ while not done_profiling:
|
|||||||
ans, arg = q.promptUser('noexit')
|
ans, arg = q.promptUser('noexit')
|
||||||
|
|
||||||
if ans == 'CMD_SCAN':
|
if ans == 'CMD_SCAN':
|
||||||
lp_ret = apparmor.do_logprof_pass(logmark, passno)
|
apparmor.do_logprof_pass(logmark, passno)
|
||||||
passno += 1
|
passno += 1
|
||||||
if lp_ret == 'FINISHED':
|
|
||||||
done_profiling = True
|
|
||||||
else:
|
else:
|
||||||
done_profiling = True
|
done_profiling = True
|
||||||
|
|
||||||
|
@@ -1701,8 +1701,6 @@ def do_logprof_pass(logmark='', passno=0):
|
|||||||
|
|
||||||
ask_the_questions(log_dict)
|
ask_the_questions(log_dict)
|
||||||
|
|
||||||
finishing = False
|
|
||||||
# Check for finished
|
|
||||||
save_profiles()
|
save_profiles()
|
||||||
|
|
||||||
##if not repo_cfg['repository'].get('upload', False) or repo['repository']['upload'] == 'later':
|
##if not repo_cfg['repository'].get('upload', False) or repo['repository']['upload'] == 'later':
|
||||||
@@ -1712,13 +1710,6 @@ def do_logprof_pass(logmark='', passno=0):
|
|||||||
## sync_profiles()
|
## sync_profiles()
|
||||||
## created = []
|
## created = []
|
||||||
|
|
||||||
# If user selects 'Finish' then we want to exit logprof
|
|
||||||
if finishing:
|
|
||||||
return 'FINISHED'
|
|
||||||
else:
|
|
||||||
return 'NORMAL'
|
|
||||||
|
|
||||||
|
|
||||||
def save_profiles():
|
def save_profiles():
|
||||||
# Ensure the changed profiles are actual active profiles
|
# Ensure the changed profiles are actual active profiles
|
||||||
for prof_name in changed.keys():
|
for prof_name in changed.keys():
|
||||||
|
Reference in New Issue
Block a user