mirror of
https://github.com/PirateBox-Dev/PirateBoxScripts_Webserver.git
synced 2026-12-05 00:38:42 +00:00
try-catch for file deletion bug.
This commit is contained in:
1 parent
85ac67a41e
commit
394fc229e2
1 file changed
+7
-1
@@ -43,7 +43,13 @@ def generate_html_into_file(content):
|
||||
#--------------
|
||||
def get_usage(drive):
|
||||
|
||||
file_mod_time = modification_date(htmlfilename)
|
||||
try:
|
||||
file_mod_time = modification_date(htmlfilename)
|
||||
except OSError:
|
||||
content = prepare_line(drive)
|
||||
generate_html_into_file(content)
|
||||
file_mod_time = modification_date(htmlfilename)
|
||||
|
||||
now = datetime.datetime.today()
|
||||
max_delay = datetime.timedelta(0,delay)
|
||||
age = now - file_mod_time
|
||||
|
||||
Reference in new issue
Block a user