Skip to content

Commit

Permalink
Merge pull request #1089 from doronz88/bugfix/condition-list
Browse files Browse the repository at this point in the history
cli: fix `developer condition list`
  • Loading branch information
doronz88 authored Jun 23, 2024
2 parents 026ff49 + 4a17b3a commit 0e7b26a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pymobiledevice3/cli/developer.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ def sysmon_process_monitor(service_provider: LockdownClient, threshold):
entries = []
for process in process_snapshot:
if (process['cpuUsage'] is not None) and (process['cpuUsage'] >= threshold):
entries.append(Process(pid=process['pid'], name=process['name'], cpuUsage=process['cpuUsage'], physFootprint=process['physFootprint']))
entries.append(Process(pid=process['pid'], name=process['name'], cpuUsage=process['cpuUsage'],
physFootprint=process['physFootprint']))

logger.info(entries)

Expand Down Expand Up @@ -888,9 +889,9 @@ def condition():


@condition.command('list', cls=Command)
def condition_list(lockdown: LockdownClient):
def condition_list(service_provider: LockdownServiceProvider) -> None:
""" list all available conditions """
with DvtSecureSocketProxyService(lockdown=lockdown) as dvt:
with DvtSecureSocketProxyService(lockdown=service_provider) as dvt:
print_json(ConditionInducer(dvt).list())


Expand Down

0 comments on commit 0e7b26a

Please sign in to comment.