Change log level to warning for first mount failure

This commit is contained in:
Yue Zhang
2015-03-20 15:26:08 +08:00
parent 26785b6427
commit 0bf5284cd7
+2 -1
View File
@@ -499,8 +499,9 @@ class AbstractDistro(object):
if existingFS == "7" and fs != "ntfs":
Run("sfdisk -c " + device + " 1 83")
Run("mkfs." + fs + " " + partition)
if Run("mount " + partition + " " + mountpoint):
if Run("mount " + partition + " " + mountpoint, chk_err=False):
#If mount failed, try to format the partition and mount again
Warn("Failed to mount resource disk. Retry mounting.")
Run("mkfs." + fs + " " + partition + " -F")
if Run("mount " + partition + " " + mountpoint):
Error("ActivateResourceDisk: Failed to mount resource disk (" + partition + ").")