mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 11:18:11 +00:00
Fix tests
This commit is contained in:
parent
89b7d62ec6
commit
4ffb2c8c20
@ -35,10 +35,13 @@ class UploadHandler:
|
|||||||
)
|
)
|
||||||
def index(request, response):
|
def index(request, response):
|
||||||
files = []
|
files = []
|
||||||
|
try:
|
||||||
for filename in os.listdir(UploadHandler.image_directory()):
|
for filename in os.listdir(UploadHandler.image_directory()):
|
||||||
if os.path.isfile(os.path.join(UploadHandler.image_directory(), filename)):
|
if os.path.isfile(os.path.join(UploadHandler.image_directory(), filename)):
|
||||||
if filename[0] != ".":
|
if filename[0] != ".":
|
||||||
files.append(filename)
|
files.append(filename)
|
||||||
|
except OSError as e:
|
||||||
|
pass
|
||||||
response.template("upload.html", files=files, image_path=UploadHandler.image_directory())
|
response.template("upload.html", files=files, image_path=UploadHandler.image_directory())
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user