Skip to content

Commit

Permalink
fix: [apps] fix apps analyser
Browse files Browse the repository at this point in the history
  • Loading branch information
cvandeplas committed Oct 21, 2024
1 parent b16133e commit facd84d
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/sysdiagnose/analysers/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@
# Author: Emiliern Le Jamtel

import re
import logging
from sysdiagnose.utils.base import BaseAnalyserInterface
from sysdiagnose.utils.base import BaseAnalyserInterface, logger
from sysdiagnose.parsers.accessibility_tcc import AccessibilityTccParser
from sysdiagnose.parsers.brctl import BrctlParser
from sysdiagnose.parsers.itunesstore import iTunesStoreParser
from sysdiagnose.parsers.logarchive import LogarchiveParser

logger = logging.getLogger('sysdiagnose')


class AppsAnalyser(BaseAnalyserInterface):
description = 'Get list of Apps installed on the device'
Expand All @@ -29,15 +26,7 @@ def execute(self):
apps = {}
json_data = AccessibilityTccParser(self.config, self.case_id).get_result()
for entry in json_data:
if entry['db_table'] != 'access':
continue
try:
try:
apps[entry['client']]['services'].append(entry['service'])
except KeyError:
apps[entry['client']]['services'] = [entry['service']]
except (KeyError, TypeError):
apps[entry['client']] = {'found': ['accessibility-tcc'], 'services': [entry['service']]}
apps[entry['client']] = {'found': ['accessibility-tcc'], 'services': [entry['service']]}

json_data = BrctlParser(self.config, self.case_id).get_result()
if json_data and not json_data.get('error'):
Expand Down

0 comments on commit facd84d

Please sign in to comment.