From c796a3c25a8bc1ba06c9de394f336bb0bd1e34c1 Mon Sep 17 00:00:00 2001 From: Cherie Williams Date: Mon, 20 Jul 2015 18:00:50 -0700 Subject: [PATCH] Provide a better error message for app-config --- pebble_tool/commands/emucontrol.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pebble_tool/commands/emucontrol.py b/pebble_tool/commands/emucontrol.py index 6e037de..77060ec 100644 --- a/pebble_tool/commands/emucontrol.py +++ b/pebble_tool/commands/emucontrol.py @@ -8,6 +8,7 @@ from libpebble2.communication.transports.websocket.protocol import WebSocketPhonesimConfigResponse, WebSocketRelayQemu from libpebble2.communication.transports.qemu.protocol import * from libpebble2.communication.transports.qemu import MessageTargetQemu, QemuTransport +from libpebble2.exceptions import TimeoutError import os from .base import PebbleCommand @@ -110,6 +111,8 @@ def __call__(self, args): raise ToolError("App config is only supported over phonesim connections.") except IOError as e: raise ToolError(str(e)) + except TimeoutError: + raise ToolError("No JS found, unable to load configuration.") if args.file: config_url = "file://{}".format(os.path.realpath(os.path.expanduser(args.file)))