M server/src/remuco/cli.py +3 -0
@@ 144,6 144,9 @@ def getconfig():
g.add_argument('--no-wifi',
action='store_false', dest='wifi',
help="disables WiFi/IP connectivity")
+ g.add_argument('--wifi-host',
+ default='', metavar="HOST", dest='wifihost',
+ help="WiFi/IP host name (default: %(default)s)")
g.add_argument('--wifi-port',
type=int, default=34721, metavar="PORT", dest='wifiport',
help="WiFi/IP port (default: %(default)s)")
M server/src/remuco/net.py +1 -1
@@ 238,7 238,7 @@ class WifiServer(_Server):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) # FIXME: just for testing
- host = '' # TODO: use config
+ host = self.rem.config.wifihost
port = self.rem.config.wifiport
sock.bind((host, port))
return sock
M server/src/tests/test_config.dt +2 -2
@@ 10,7 10,7 @@ Default options:
>>> sys.argv[1:] = []
>>> getconfig() # doctest: +ELLIPSIS
- Namespace(bluetooth=True, bluetoothchannel=0, logfile='....cache/remuco/server.log', loglevel='INFO', wifi=True, wifiport=34721)
+ Namespace(bluetooth=True, bluetoothchannel=0, logfile='....cache/remuco/server.log', loglevel='INFO', wifi=True, wifihost='', wifiport=34721)
Adjust individual options:
@@ 26,7 26,7 @@ Adjust individual options:
>>> getconfig() # doctest: +ELLIPSIS
Namespace(...logfile='?'...)
-Bas option values:
+Bad option values:
>>> sys.stderr = DEVNULL