@@ -13,18 +13,16 @@ if [ -z "$ANDROID_SERIAL" ]; then
16−UNLOCK_SCRIPT="
16+UNLOCK_SCRIPT='
17import dbus, logging;
17import dbus, logging;
18from unity8 import process_helpers as helpers;
18from unity8 import process_helpers as helpers;
19logging.basicConfig(level=logging.INFO);
19logging.basicConfig(level=logging.INFO);
20−bus = dbus.SystemBus().get_object(\"com.canonical.powerd\", \"/com/canonical/powerd\");
20+bus = dbus.SystemBus().get_object("com.canonical.powerd", "/com/canonical/powerd");
21−cookie = bus.requestSysState(\"unlock-device-hold\", 1, dbus_interface=\"com.canonical.powerd\");
21+cookie = bus.requestSysState("unlock-device-hold", 1, dbus_interface="com.canonical.powerd");
22helpers.restart_unity_with_testability();
22helpers.restart_unity_with_testability();
23−bus.clearSysState(cookie, dbus_interface=\"com.canonical.powerd\");
23+bus.clearSysState(cookie, dbus_interface="com.canonical.powerd");
24helpers.unlock_unity()
24helpers.unlock_unity()
30while [ $retries -lt $max_retries ]; do
28while [ $retries -lt $max_retries ]; do
@@ -43,9 +41,9 @@ while [ $retries -lt $max_retries ]; do
43 echo "W: Unlock failed, trying again"
41 echo "W: Unlock failed, trying again"
45 echo "E: Unlock failed, no more retries"
43 echo "E: Unlock failed, no more retries"
46− RETURN_CODE=1
44+ exit 1
51−exit $RETURN_CODE
49+exit 0