mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 19:28:07 +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 = []
|
||||||
for filename in os.listdir(UploadHandler.image_directory()):
|
try:
|
||||||
if os.path.isfile(os.path.join(UploadHandler.image_directory(), filename)):
|
for filename in os.listdir(UploadHandler.image_directory()):
|
||||||
if filename[0] != ".":
|
if os.path.isfile(os.path.join(UploadHandler.image_directory(), filename)):
|
||||||
files.append(filename)
|
if filename[0] != ".":
|
||||||
|
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