[+] update http_server

1. remove ping dependency;
This commit is contained in:
Siarhei Siniak 2025-04-19 18:10:07 +03:00
parent fdcd67aae6
commit a912e1b6bf
3 changed files with 16 additions and 5 deletions

@ -1158,6 +1158,7 @@ done'
)
def http_server(argv):
from .commands_typed import os as commands_os
assert isinstance(argv, list) and all([isinstance(o, str) for o in argv])
parser = optparse.OptionParser()
parser.add_option(
@ -1215,10 +1216,17 @@ def http_server(argv):
try:
assert not socket.inet_aton(options.host) is None
subprocess.check_call([
'ping', '-w', '1',
options.host
])
# subprocess.check_call([
# 'ping', '-w', '1',
# options.host
# ])
assert options.host in sum([
[
o2.local
for o2 in o.addr_info
]
for o in commands_os.interfaces_index()
], [])
except Exception:
raise RuntimeError('invalid ip address %s' % options.host)

@ -1,6 +1,6 @@
[project]
name = 'online.fxreader.pr34'
version = '0.1.5.9+27.1'
version = '0.1.5.9+27.2'
dependencies = [
#"-r requirements.txt",

Binary file not shown.