Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0963b0777421
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9785b39edd5b
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Jul 18, 2016

  1. tools: __all__ update

    jordens committed Jul 18, 2016
    Copy the full SHA
    b9000fa View commit details
  2. 2
    Copy the full SHA
    9785b39 View commit details
Showing with 7 additions and 4 deletions.
  1. +7 −4 artiq/tools.py
11 changes: 7 additions & 4 deletions artiq/tools.py
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@
"init_logger", "bind_address_from_args",
"atexit_register_coroutine", "exc_to_warning",
"asyncio_wait_or_cancel", "TaskObject", "Condition",
"get_windows_drives"]
"get_windows_drives", "get_user_config_dir"]


logger = logging.getLogger(__name__)
@@ -121,16 +121,17 @@ def simple_network_args(parser, default_port):
group = parser.add_argument_group("network server")
group.add_argument(
"--bind", default=[], action="append",
help="add an hostname or IP address to bind to")
help="additional hostname or IP addresse to bind to; "
"use '*' to bind to all interfaces (default: %(default)s)")
group.add_argument(
"--no-localhost-bind", default=False, action="store_true",
help="do not implicitly bind to localhost addresses")
help="do not implicitly also bind to localhost addresses")
if isinstance(default_port, int):
group.add_argument("-p", "--port", default=default_port, type=int,
help="TCP port to listen to (default: %(default)d)")
else:
for name, purpose, default in default_port:
h = ("TCP port to listen to for {} (default: {})"
h = ("TCP port to listen to on for {} connections (default: {})"
.format(purpose, default))
group.add_argument("--port-" + name, default=default, type=int,
help=h)
@@ -164,6 +165,8 @@ def init_logger(args):


def bind_address_from_args(args):
if "*" in args.bind:
return None
if args.no_localhost_bind:
return args.bind
else: