mirror of https://github.com/m-labs/artiq.git
dashboard,browser: do not call get_user_config_dir() in argparse
This caused two problems when building the docs: * the path printed in the docs depends on the machine where they are built * it pollutes ~/.config, and also breaks Nix builds
This commit is contained in:
parent
40a0cf806d
commit
596d3e20d7
|
@ -20,10 +20,8 @@ logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def get_argparser():
|
def get_argparser():
|
||||||
default_db_file = os.path.join(get_user_config_dir(), "artiq_browser.pyon")
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description="ARTIQ Browser")
|
parser = argparse.ArgumentParser(description="ARTIQ Browser")
|
||||||
parser.add_argument("--db-file", default=default_db_file,
|
parser.add_argument("--db-file", default=None,
|
||||||
help="database file for local browser settings "
|
help="database file for local browser settings "
|
||||||
"(default: %(default)s)")
|
"(default: %(default)s)")
|
||||||
parser.add_argument("--browse-root", default="",
|
parser.add_argument("--browse-root", default="",
|
||||||
|
@ -132,6 +130,8 @@ class Browser(QtWidgets.QMainWindow):
|
||||||
def main():
|
def main():
|
||||||
# initialize application
|
# initialize application
|
||||||
args = get_argparser().parse_args()
|
args = get_argparser().parse_args()
|
||||||
|
if args.db_file is None:
|
||||||
|
args.db_file = os.path.join(get_user_config_dir(), "artiq_browser.pyon")
|
||||||
widget_log_handler = log.init_log(args, "browser")
|
widget_log_handler = log.init_log(args, "browser")
|
||||||
|
|
||||||
app = QtWidgets.QApplication(["ARTIQ Browser"])
|
app = QtWidgets.QApplication(["ARTIQ Browser"])
|
||||||
|
|
|
@ -36,9 +36,7 @@ def get_argparser():
|
||||||
help="TCP port to connect to for broadcasts")
|
help="TCP port to connect to for broadcasts")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--db-file", default=None,
|
"--db-file", default=None,
|
||||||
help="database file for local GUI settings, "
|
help="database file for local GUI settings")
|
||||||
"by default in {} and dependant on master hostname".format(
|
|
||||||
get_user_config_dir()))
|
|
||||||
add_common_args(parser)
|
add_common_args(parser)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
|
|
@ -107,3 +107,9 @@ The core device tests require the following TTL devices and connections:
|
||||||
* ``loop_clock_in``: any input-capable TTL. Must be physically connected to ``loop_clock_out``.
|
* ``loop_clock_in``: any input-capable TTL. Must be physically connected to ``loop_clock_out``.
|
||||||
|
|
||||||
If TTL devices are missing, the corresponding tests are skipped.
|
If TTL devices are missing, the corresponding tests are skipped.
|
||||||
|
|
||||||
|
find the dashboard and browser configuration files are stored?
|
||||||
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
::
|
||||||
|
python -c "from artiq.tools import get_user_config_dir; print(get_user_config_dir())"
|
||||||
|
|
Loading…
Reference in New Issue