with open(programs["bundle_id"], "r") as f:
bundle_id = f.read().strip()
self.util.setBundleId(bundle_id)
del programs["bundle_id"]
// find the first zipped app file
assert "program" in programs, "program is not specified"
program = programs["program"]
assert program[-8:] == ".app.zip", \
After Change
app_dir = os.path.join(self.tempdir, "Payload")
dirs = [f for f in os.listdir(app_dir)
if os.path.isdir(os.path.join(app_dir, f))]
assert len(dirs) == 1, "Only one app in the Payload directory"
app_name = dirs[0]
self.app = os.path.join(app_dir, app_name)
del programs["program"]