tests: Serve index.html files in webserver_sub.py.
This commit is contained in:
parent
f8668ff710
commit
93ef85ff16
@ -47,6 +47,8 @@ def send_data(path):
|
|||||||
basedir = os.path.realpath(os.path.dirname(__file__))
|
basedir = os.path.realpath(os.path.dirname(__file__))
|
||||||
data_dir = os.path.join(basedir, 'data')
|
data_dir = os.path.join(basedir, 'data')
|
||||||
print(basedir)
|
print(basedir)
|
||||||
|
if os.path.isdir(os.path.join(data_dir, path)):
|
||||||
|
path = path + '/index.html'
|
||||||
return flask.send_from_directory(data_dir, path)
|
return flask.send_from_directory(data_dir, path)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user