mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-10 08:52:21 +03:00
a boolean flag is added if a policy is executed
This commit is contained in:
parent
73ece8417d
commit
bd890f2ce1
1 changed files with 1 additions and 1 deletions
|
@ -221,6 +221,7 @@ class ExecutionManager(object):
|
|||
def execute_policy(self, arg):
|
||||
try:
|
||||
j = json.loads(str(arg))
|
||||
self.policy_executed[j['username']] = True
|
||||
for i in range(len(j['executePolicyList'])):
|
||||
policy = self.json_to_PolicyBean(json.loads(json.dumps(j['executePolicyList'][i])))
|
||||
self.logger.debug('Updating policies...')
|
||||
|
@ -240,7 +241,6 @@ class ExecutionManager(object):
|
|||
self.db_service.delete('policy', 'type = \'U\' and name = \'' + policy.get_username() + '\'' +
|
||||
'and policy_id = ' + str(policy.get_policy_id()))
|
||||
else:
|
||||
self.policy_executed[policy.get_username()] = True
|
||||
machine_uid = self.db_service.select_one_result('registration', 'jid', 'registered=1')
|
||||
user_policy_version = self.db_service.select_one_result('policy', 'version',
|
||||
'type = \'U\' and name = \'' + policy.get_username() + '\'' +
|
||||
|
|
Loading…
Reference in a new issue