Skip to content

Commit

Permalink
pdq2: rename url parameter to device and require it
Browse files Browse the repository at this point in the history
  • Loading branch information
jordens committed Mar 21, 2015
1 parent 0578169 commit 8cb77b0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions artiq/frontend/pdq2_controller.py
Expand Up @@ -11,10 +11,9 @@ def get_argparser():
parser = argparse.ArgumentParser(description="PDQ2 controller")
simple_network_args(parser, 3252)
parser.add_argument(
"-u", "--url", default="hwgrep://",
help="device url [%(default)s]")
"-d", "--device", required=True, help="device url/path/name")
parser.add_argument(
"-d", "--dump", default=None,
"-u", "--dump", default=None,
help="file to dump pdq2 data into, for later simulation")
verbosity_args(parser)
return parser
Expand All @@ -26,10 +25,10 @@ def main():
port = None
if args.dump:
port = open(args.dump, "wb")
dev = Pdq2(url=args.url, dev=port)
dev = Pdq2(url=args.device, dev=port)
try:
simple_server_loop({"pdq2": dev}, args.bind, args.port,
id_parameters="url=" + str(args.url))
id_parameters="device=" + str(args.device))
finally:
dev.close()

Expand Down

0 comments on commit 8cb77b0

Please sign in to comment.