Skip to content

Commit

Permalink
Merge pull request #1178 from doronz88/bugfix/restore-update-ios18-py…
Browse files Browse the repository at this point in the history
…thon39

restore: fix restoring ios18 on python versions<3.11
  • Loading branch information
doronz88 authored Sep 3, 2024
2 parents f18bc42 + e2c09c9 commit cea6bff
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pymobiledevice3/restore/restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,9 @@ async def send_source_boot_object_v4(self, message: Mapping) -> None:
if i == 0 and chunk.startswith(b'AEA1'):
self.logger.debug('First chunk in a AEA')
try:
async with asyncio.timeout(3):
message = await service.aio_recv_plist()
await self.send_url_asset(message)
except asyncio.TimeoutError:
message = await asyncio.wait_for(service.aio_recv_plist(), timeout=3)
await self.send_url_asset(message)
except asyncio.exceptions.TimeoutError:
self.logger.debug('No URLAsset was requested. Assuming it is not necessary')

# Send FileDataDone
Expand Down

0 comments on commit cea6bff

Please sign in to comment.