chore: check if iso-update dir exists

This commit is contained in:
Rudra Saraswat 2023-06-24 21:28:12 +10:00
parent d1bd93a980
commit e9e570df48

View file

@ -109,6 +109,7 @@ def get_server_timestamp():
def update_system(): def update_system():
os.chdir('/mnt') os.chdir('/mnt')
if os.path.isdir('/mnt/iso-update'):
for f in os.listdir('/mnt/iso-update'): for f in os.listdir('/mnt/iso-update'):
if f != 'update.iso': if f != 'update.iso':
exec('rm', '-f', f) exec('rm', '-f', f)