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