add missing umount no matter what

This commit is contained in:
HappyZ 2019-01-29 12:58:25 -06:00
parent b37239caa3
commit 0f04a49ef1
1 changed files with 2 additions and 0 deletions

View File

@ -244,6 +244,7 @@ class DPT():
if fromSD:
if not self.diagnosis_mount_sd():
self.err_print("Failed to mount mass storage at {}".format(self.sd_tmp_mpt))
self.diagnosis_umount_sd()
return False
if not self.diagnosis_isfile(fp):
fp = "{0}/{1}".format(self.sd_tmp_mpt, fp)
@ -270,6 +271,7 @@ class DPT():
if fromSD:
if not self.diagnosis_mount_sd():
self.err_print("Failed to mount mass storage at {}".format(self.sd_tmp_mpt))
self.diagnosis_umount_sd()
return False
if not self.diagnosis_isfile(fp):
fp = "{0}/{1}".format(self.sd_tmp_mpt, fp)