skip unreadable blockdevices (e.g. partitionable devices)
This commit is contained in:
parent
61ad765be6
commit
cbb499e7e3
|
@ -573,6 +573,10 @@ class Blockdevice:
|
||||||
LOGGER.warning("Failed to call '%s' to determine UUID: %s" % \
|
LOGGER.warning("Failed to call '%s' to determine UUID: %s" % \
|
||||||
(prefs["Programs"]["blkid"], err_msg))
|
(prefs["Programs"]["blkid"], err_msg))
|
||||||
return None
|
return None
|
||||||
|
if proc.returncode == 2:
|
||||||
|
## the device does not contain a filesystem (e.g. it is zeroed or
|
||||||
|
## it contains a partition table)
|
||||||
|
return None
|
||||||
if proc.returncode != 0:
|
if proc.returncode != 0:
|
||||||
LOGGER.warning("Execution of '%s' for '%s' failed: %s" % \
|
LOGGER.warning("Execution of '%s' for '%s' failed: %s" % \
|
||||||
(prefs["Programs"]["blkid"], self.devnodes[0],
|
(prefs["Programs"]["blkid"], self.devnodes[0],
|
||||||
|
@ -612,6 +616,10 @@ class Blockdevice:
|
||||||
% prefs["Programs"]["blkid"] + "'%s': %s" % \
|
% prefs["Programs"]["blkid"] + "'%s': %s" % \
|
||||||
(self.devnodes[0], err_msg))
|
(self.devnodes[0], err_msg))
|
||||||
return None
|
return None
|
||||||
|
if proc.returncode == 2:
|
||||||
|
## the device does not contain a filesystem (e.g. it is zeroed or
|
||||||
|
## it contains a partition table)
|
||||||
|
return None
|
||||||
if proc.returncode != 0:
|
if proc.returncode != 0:
|
||||||
LOGGER.warning("Execution of '%s' for '%s' failed: %s" % \
|
LOGGER.warning("Execution of '%s' for '%s' failed: %s" % \
|
||||||
(prefs["Programs"]["blkid"], self.devnodes[0],
|
(prefs["Programs"]["blkid"], self.devnodes[0],
|
||||||
|
@ -652,6 +660,10 @@ class Blockdevice:
|
||||||
% prefs["Programs"]["blkid"] + " '%s': %s" % \
|
% prefs["Programs"]["blkid"] + " '%s': %s" % \
|
||||||
(self.devnodes[0], err_msg))
|
(self.devnodes[0], err_msg))
|
||||||
return None
|
return None
|
||||||
|
if proc.returncode == 2:
|
||||||
|
## the device does not contain a filesystem (e.g. it is zeroed or
|
||||||
|
## it contains a partition table)
|
||||||
|
return None
|
||||||
if proc.returncode != 0:
|
if proc.returncode != 0:
|
||||||
LOGGER.warning("Execution of '%s' for '%s' failed: %s" % \
|
LOGGER.warning("Execution of '%s' for '%s' failed: %s" % \
|
||||||
(prefs["Programs"]["blkid"], self.devnodes[0],
|
(prefs["Programs"]["blkid"], self.devnodes[0],
|
||||||
|
|
Loading…
Reference in a new issue