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,9 +109,10 @@ def get_server_timestamp():
def update_system(): def update_system():
os.chdir('/mnt') os.chdir('/mnt')
for f in os.listdir('/mnt/iso-update'): if os.path.isdir('/mnt/iso-update'):
if f != 'update.iso': for f in os.listdir('/mnt/iso-update'):
exec('rm', '-f', f) if f != 'update.iso':
exec('rm', '-f', f)
# Check if update is available # Check if update is available
if os.path.isfile('/etc/blend_release'): if os.path.isfile('/etc/blend_release'):