Merge pull request #173 from ramanr1/patch-1

Convert system_dump to str for current app lookup
This commit is contained in:
Jake Wharton
2021-04-05 09:19:13 -04:00
committed by GitHub
+1 -1
View File
@@ -63,7 +63,7 @@ if args.use_emulator:
if args.current_app:
system_dump_command = base_adb_command + ["shell", "dumpsys", "activity", "activities"]
system_dump = subprocess.Popen(system_dump_command, stdout=PIPE, stderr=PIPE).communicate()[0]
running_package_name = re.search(".*TaskRecord.*A[= ]([^ ^}]*)", system_dump).group(1)
running_package_name = re.search(".*TaskRecord.*A[= ]([^ ^}]*)", str(system_dump)).group(1)
package.append(running_package_name)
if len(package) == 0: