|
16 | 16 | import logging |
17 | 17 | import grpc |
18 | 18 |
|
| 19 | +import collections.abc |
| 20 | +# fix pyreadline on windows py310 |
| 21 | +collections.Callable = collections.abc.Callable |
| 22 | + |
19 | 23 | from urllib.parse import quote |
20 | 24 | from collections import defaultdict |
21 | 25 | from os.path import basename, dirname, expanduser, join as joinpath |
@@ -1817,11 +1821,12 @@ def __exit__(self, type, value, traceback): |
1817 | 1821 | import argparse |
1818 | 1822 |
|
1819 | 1823 | parser = argparse.ArgumentParser() |
1820 | | - parser.add_argument("-device", type=str, required=True, |
| 1824 | + crt = os.environ.get("CERTIFICATE", None) |
| 1825 | + port = int(os.environ.get("PORT", 65000)) |
| 1826 | + parser.add_argument("-device", type=str, default="localhost", |
1821 | 1827 | help="service ip address") |
1822 | | - parser.add_argument("-port", type=int, default=65000, |
| 1828 | + parser.add_argument("-port", type=int, default=port, |
1823 | 1829 | help="service port") |
1824 | | - crt = os.environ.get("CERTIFICATE", None) |
1825 | 1830 | parser.add_argument("-cert", type=str, default=crt, |
1826 | 1831 | help="ssl cert") |
1827 | 1832 | args = parser.parse_args() |
|
0 commit comments