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