mirror of
https://github.com/imcarlost/pidcat-repl.git
synced 2026-08-08 23:17:43 -04:00
fix typo 'match_pacakges'
This commit is contained in:
@@ -127,7 +127,7 @@ input = os.popen('adb logcat')
|
|||||||
pids = set()
|
pids = set()
|
||||||
last_tag = None
|
last_tag = None
|
||||||
|
|
||||||
def match_pacakges(token):
|
def match_packages(token):
|
||||||
index = token.find(':')
|
index = token.find(':')
|
||||||
return (token in args.package) if index == -1 else (token[:index] in args.package)
|
return (token in args.package) if index == -1 else (token[:index] in args.package)
|
||||||
|
|
||||||
@@ -137,17 +137,17 @@ def parse_death(tag, message):
|
|||||||
kill = PID_KILL.match(message)
|
kill = PID_KILL.match(message)
|
||||||
if kill:
|
if kill:
|
||||||
pid = kill.group(1)
|
pid = kill.group(1)
|
||||||
if match_pacakges(kill.group(2)) and pid in pids:
|
if match_packages(kill.group(2)) and pid in pids:
|
||||||
return pid
|
return pid
|
||||||
leave = PID_LEAVE.match(message)
|
leave = PID_LEAVE.match(message)
|
||||||
if leave:
|
if leave:
|
||||||
pid = leave.group(2)
|
pid = leave.group(2)
|
||||||
if match_pacakges(leave.group(1)) and pid in pids:
|
if match_packages(leave.group(1)) and pid in pids:
|
||||||
return pid
|
return pid
|
||||||
death = PID_DEATH.match(message)
|
death = PID_DEATH.match(message)
|
||||||
if death:
|
if death:
|
||||||
pid = death.group(2)
|
pid = death.group(2)
|
||||||
if match_pacakges(death.group(1)) and pid in pids:
|
if match_packages(death.group(1)) and pid in pids:
|
||||||
return pid
|
return pid
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ while True:
|
|||||||
if start is not None:
|
if start is not None:
|
||||||
line_package, target, line_pid, line_uid, line_gids = start.groups()
|
line_package, target, line_pid, line_uid, line_gids = start.groups()
|
||||||
|
|
||||||
if match_pacakges(line_package):
|
if match_packages(line_package):
|
||||||
pids.add(line_pid)
|
pids.add(line_pid)
|
||||||
|
|
||||||
linebuf = '\n'
|
linebuf = '\n'
|
||||||
|
|||||||
Reference in New Issue
Block a user