From: Evgeni Golov Date: Mon, 13 May 2013 07:21:50 +0000 (+0200) Subject: "if not" also triggers when value is 0, use "if is None" instead X-Git-Tag: v0.13.7~9 X-Git-Url: http://git.grml.org/?p=grml2usb.git;a=commitdiff_plain;h=3fb00de77fae03538fc03c78ea31298a280aac37 "if not" also triggers when value is 0, use "if is None" instead --- diff --git a/grml2usb b/grml2usb index e2cffe8..e1d7f5c 100755 --- a/grml2usb +++ b/grml2usb @@ -1556,7 +1556,7 @@ def handle_mbr(device): return 0 mbr_device, partition_number = get_device_from_partition(device) - if not partition_number: + if partition_number is None: logging.warn("Could not detect partition number, not activating partition") # if we get e.g. /dev/loop1 as device we don't want to put the MBR