Skip to content

Commit 972e4dc

Browse files
Fix running app on device when devicectl returns incomplete data (#2807)
Signed-off-by: Brentley Jones <github@brentleyjones.com>
1 parent 7d72354 commit 972e4dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apple/internal/templates/apple_device.template.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ def is_shutdown(self):
131131

132132
@property
133133
def is_booted(self):
134-
return self.device_properties["bootState"] == "Booted"
134+
return self.device_properties.get("bootState", "unknown") == "Booted"
135135

136136
@property
137137
def is_paired(self):
138-
return self.device_properties["pairingState"] == "paired"
138+
return self.device_properties.get("pairingState", "unknown") == "paired"
139139

140140
def __getitem__(self, name):
141141
return self.device[name]

0 commit comments

Comments
 (0)