forked from M-Labs/artiq
applets/simple: fix error msg, style
This commit is contained in:
parent
37bcd5ab7e
commit
38e225d053
|
@ -4,7 +4,7 @@ import asyncio
|
||||||
import os
|
import os
|
||||||
import string
|
import string
|
||||||
|
|
||||||
from quamash import QEventLoop, QtWidgets, QtGui, QtCore
|
from quamash import QEventLoop, QtWidgets, QtCore
|
||||||
|
|
||||||
from artiq.protocols.sync_struct import Subscriber, process_mod
|
from artiq.protocols.sync_struct import Subscriber, process_mod
|
||||||
from artiq.protocols import pyon
|
from artiq.protocols import pyon
|
||||||
|
@ -35,7 +35,7 @@ class AppletIPCClient(AsyncioChildComm):
|
||||||
self.close_cb()
|
self.close_cb()
|
||||||
elif reply["action"] != "embed_done":
|
elif reply["action"] != "embed_done":
|
||||||
logger.error("unexpected action reply to embed request: %s",
|
logger.error("unexpected action reply to embed request: %s",
|
||||||
action)
|
reply["action"])
|
||||||
self.close_cb()
|
self.close_cb()
|
||||||
|
|
||||||
def fix_initial_size(self):
|
def fix_initial_size(self):
|
||||||
|
@ -61,7 +61,7 @@ class AppletIPCClient(AsyncioChildComm):
|
||||||
raise ValueError("unknown action in parent message")
|
raise ValueError("unknown action in parent message")
|
||||||
except:
|
except:
|
||||||
logger.error("error processing parent message",
|
logger.error("error processing parent message",
|
||||||
exc_info=True)
|
exc_info=True)
|
||||||
self.close_cb()
|
self.close_cb()
|
||||||
|
|
||||||
def subscribe(self, datasets, init_cb, mod_cb):
|
def subscribe(self, datasets, init_cb, mod_cb):
|
||||||
|
@ -79,10 +79,10 @@ class SimpleApplet:
|
||||||
|
|
||||||
self.argparser = argparse.ArgumentParser(description=cmd_description)
|
self.argparser = argparse.ArgumentParser(description=cmd_description)
|
||||||
|
|
||||||
self.argparser.add_argument("--update-delay", type=float,
|
self.argparser.add_argument(
|
||||||
default=default_update_delay,
|
"--update-delay", type=float, default=default_update_delay,
|
||||||
help="time to wait after a mod (buffering other mods) "
|
help="time to wait after a mod (buffering other mods) "
|
||||||
"before updating (default: %(default).2f)")
|
"before updating (default: %(default).2f)")
|
||||||
|
|
||||||
group = self.argparser.add_argument_group("standalone mode (default)")
|
group = self.argparser.add_argument_group("standalone mode (default)")
|
||||||
group.add_argument(
|
group.add_argument(
|
||||||
|
@ -94,8 +94,9 @@ class SimpleApplet:
|
||||||
"--port", default=3250, type=int,
|
"--port", default=3250, type=int,
|
||||||
help="TCP port to connect to")
|
help="TCP port to connect to")
|
||||||
|
|
||||||
self.argparser.add_argument("--embed", default=None,
|
self.argparser.add_argument(
|
||||||
help="embed into GUI", metavar="IPC_ADDRESS")
|
"--embed", default=None, help="embed into GUI",
|
||||||
|
metavar="IPC_ADDRESS")
|
||||||
|
|
||||||
self._arggroup_datasets = self.argparser.add_argument_group("datasets")
|
self._arggroup_datasets = self.argparser.add_argument_group("datasets")
|
||||||
|
|
||||||
|
@ -148,7 +149,7 @@ class SimpleApplet:
|
||||||
# testing has shown that the following procedure must be
|
# testing has shown that the following procedure must be
|
||||||
# followed exactly on Linux:
|
# followed exactly on Linux:
|
||||||
# 1. applet creates widget
|
# 1. applet creates widget
|
||||||
# 2. applet creates native window without showing it, and
|
# 2. applet creates native window without showing it, and
|
||||||
# gets its ID
|
# gets its ID
|
||||||
# 3. applet sends the ID to host, host embeds the widget
|
# 3. applet sends the ID to host, host embeds the widget
|
||||||
# 4. applet shows the widget
|
# 4. applet shows the widget
|
||||||
|
|
Loading…
Reference in New Issue