fixing path

This commit is contained in:
Cayo Puigdefabregas 2022-06-24 12:39:46 +02:00
parent 2760348cc0
commit 72c19501fa
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,6 @@
import os import os
import time import time
from pathlib import Path
import flask import flask
from flask import Blueprint from flask import Blueprint
@ -37,10 +38,9 @@ class SettingsView(GenericMixin):
return flask.render_template(self.template_name, **self.context) return flask.render_template(self.template_name, **self.context)
def get_iso(self): def get_iso(self):
path = Path(__file__).parent.parent
files = [ files = [
f f for f in os.listdir(f'{path}/static/iso/') if f[-3:].lower() == 'iso'
for f in os.listdir('ereuse_devicehub/static/iso/')
if f[-3:].lower() == 'iso'
] ]
self.context['iso'] = '' self.context['iso'] = ''